Package com.google.speedtracer.client.model.ChromeDebuggerDataInstance

Examples of com.google.speedtracer.client.model.ChromeDebuggerDataInstance.Proxy


        }
      });
    } else {
      // We are dealing with RAW data (untransformed inspector data) that still
      // needs conversion.
      final Proxy proxy = new Proxy(tabId) {
        @Override
        protected void connectToDataSource() {
          // Tell the data_loader content script to start sending.
          port.postMessage(LoadFileDataInstance.createAck());
        }
      };

      // Connect the DataInstance to receive data from the data_loader
      port.getOnMessageEvent().addListener(new MessageEvent.Listener() {
        boolean receivedFirstMessage;
        public void onMessage(MessageEvent.Message message) {
          if (!receivedFirstMessage) {
            receivedFirstMessage = true;
            tabModel.dataInstance.onTimelineProfilerStarted();
          }         
          PageEventMessage pageEventMessage = message.cast();
          // We don't support versioning for RAW data since it would mean
          // maintaining support for multiple Chrome versions. We assume
          // that RAW data should always be the same format as the current
          // Chrome build.
          proxy.dispatchDebuggerEventRecord(pageEventMessage.getDebuggerRecord());
        }
      });

      tabModel.dataInstance = ChromeDebuggerDataInstance.create(proxy);
      browserConn.tabMap.put(tabId, tabModel);
View Full Code Here

TOP

Related Classes of com.google.speedtracer.client.model.ChromeDebuggerDataInstance.Proxy

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.