org.chromium.sdk/src/org/chromium/sdk/DebugEventListener.java
changeset 2 e4420d2515f1
equal deleted inserted replaced
1:ef76fc2ac88c 2:e4420d2515f1
       
     1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
       
     2 // Use of this source code is governed by a BSD-style license that can be
       
     3 // found in the LICENSE file.
       
     4 
       
     5 package org.chromium.sdk;
       
     6 
       
     7 /**
       
     8  * This interface is used by the SDK to report debug events for a certain {@link JavascriptVm} to
       
     9  * the clients.
       
    10  */
       
    11 public interface DebugEventListener {
       
    12 
       
    13   /**
       
    14    * Reports the browser JavaScript virtual machine has suspended (on hitting
       
    15    * breakpoints or a step end). The {@code context} can be used to access the
       
    16    * current backtrace.
       
    17    *
       
    18    * @param context associated with the current suspended state
       
    19    */
       
    20   void suspended(DebugContext context);
       
    21 
       
    22   /**
       
    23    * Reports the browser JavaScript virtual machine has resumed. This can happen
       
    24    * asynchronously, due to a user action in the browser (without explicitly
       
    25    * resuming the VM through
       
    26    * {@link DebugContext#continueVm(org.chromium.sdk.DebugContext.StepAction, int, org.chromium.sdk.DebugContext.ContinueCallback)}).
       
    27    */
       
    28   void resumed();
       
    29 
       
    30   /**
       
    31    * Reports the debug connection has terminated and {@link JavascriptVm} has stopped operating.
       
    32    * This event is reported always, regardless of which reason causes termination.
       
    33    */
       
    34   void disconnected();
       
    35 
       
    36   /**
       
    37    * Reports that a new script has been loaded into a tab.
       
    38    *
       
    39    * @param newScript loaded into the tab
       
    40    */
       
    41   void scriptLoaded(Script newScript);
       
    42 }