Package com.google.speedtracer.client.model

Examples of com.google.speedtracer.client.model.DataInstance


        default:
      }
    }

    private void doHeadlessClearData(HeadlessClearDataMessage message) {
      DataInstance dataInstance = getDataInstance();
      dataInstance.setBaseTime(Duration.currentTimeMillis());
      eventRecordData.setLength(0);
    }
View Full Code Here


      sendToContentScript(port, dumpMessage);
    }

    private void doHeadlessMonitoringOff(HeadlessMonitoringOffMessage message) {
      // The API is telling us to turn off monitoring.
      DataInstance dataInstance = getDataInstance();
      dataInstance.stopMonitoring();
      HeadlessMonitoringOffAckMessage ackMessage = HeadlessMonitoringOffAckMessage.create();
      sendToContentScript(port, ackMessage);
    }
View Full Code Here

      sendToContentScript(port, ackMessage);
    }

    private void doHeadlessMonitoringOn(HeadlessMonitoringOnMessage message) {
      // The API is telling us to turn on monitoring.
      DataInstance dataInstance = getDataInstance();
      dataInstance.resumeMonitoring();
      HeadlessMonitoringOnMessage.Options options = message.getOptions();
      HeadlessMonitoringOnAckMessage ackMessage = HeadlessMonitoringOnAckMessage.create();
      if (options != null) {
        if (options.clearData()) {
          doHeadlessClearData(null);
View Full Code Here

      }
      sendToContentScript(port, ackMessage);
    }

    private void doHeadlessSendData(HeadlessSendDataMessage message) {
      DataInstance dataInstance = getDataInstance();
      // Pack up the data we've been saving in our list and send it out
      // via XHR.
      JsArray<JavaScriptObject> data = getEventRecordData();
      String payload = createXhrPayload(dataInstance.getBaseTime(), message,
          data);

      if (ClientConfig.isDebugMode()) {
        console.log("Sending payload of " + payload.length() + " bytes ("
            + data.length() + " trace records) to " + message.getUrl());
View Full Code Here

     * Find the currently active DataInstance associated with this tab, or
     * create a new one.
     */
    private DataInstance getDataInstance() {
      int id = port.getSender().getTab().getId();
      DataInstance dataInstance = dataInstances.get(id);
      if (dataInstance == null) {
        dataInstance = ChromeDebuggerDataInstance.create(id);
        dataInstances.put(id, dataInstance);
        HeadlessDataModel dataModel = new HeadlessDataModel();
        dataInstance.load(dataModel);
      }
      return dataInstance;
    }
View Full Code Here

            final ResetBaseTimeMessage request = data.cast();
            final int tabId = request.getTabId();
            final int browserId = request.getBrowserId();
            final BrowserConnectionState browserConnection = browserConnectionMap.get(browserId);
            final TabModel tabModel = browserConnection.tabMap.get(tabId);
            DataInstance dataInstance = tabModel.dataInstance;
            dataInstance.setBaseTime(-1);
          }

        });
      }
View Full Code Here

              Chrome.getExtension().getOnConnectExternalEvent().addListener(
                  new ConnectExternalEvent.Listener() {
                    public void onConnectExternal(Port port) {
                      if (portName.equals(port.getName())) {
                        // Provision a DataInstance and a TabDescription.
                        DataInstance dataInstance = ExternalExtensionDataInstance.create(port);
                        TabDescription tabDescription = TabDescription.create(
                            tabId, connectRequest.getTitle(),
                            connectRequest.getUrl());

                        // Now remember the DataInstance and TabDescription, and
View Full Code Here

TOP

Related Classes of com.google.speedtracer.client.model.DataInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.