Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2205)

Unified Diff: chrome_frame/tools/test/reference_build/chrome/resources/inspector/inspector_controller_impl.js

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome_frame/tools/test/reference_build/chrome/resources/inspector/inspector_controller_impl.js
===================================================================
--- chrome_frame/tools/test/reference_build/chrome/resources/inspector/inspector_controller_impl.js (revision 0)
+++ chrome_frame/tools/test/reference_build/chrome/resources/inspector/inspector_controller_impl.js (revision 0)
@@ -0,0 +1,286 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview DevTools' implementation of the InspectorController API.
+ */
+goog.require('devtools.InspectorController');
+
+goog.provide('devtools.InspectorControllerImpl');
+
+devtools.InspectorControllerImpl = function() {
+ devtools.InspectorController.call(this);
+ this.frame_element_id_ = 1;
+
+ this.installInspectorControllerDelegate_('clearMessages');
+ this.installInspectorControllerDelegate_('storeLastActivePanel');
+ this.installInspectorControllerDelegate_('highlightDOMNode');
+ this.installInspectorControllerDelegate_('hideDOMNodeHighlight');
+ this.installInspectorControllerDelegate_('getChildNodes');
+ this.installInspectorControllerDelegate_('setAttribute');
+ this.installInspectorControllerDelegate_('removeAttribute');
+ this.installInspectorControllerDelegate_('setTextNodeValue');
+ this.installInspectorControllerDelegate_('enableResourceTracking');
+ this.installInspectorControllerDelegate_('disableResourceTracking');
+ this.installInspectorControllerDelegate_('enableTimeline');
+ this.installInspectorControllerDelegate_('disableTimeline');
+ this.installInspectorControllerDelegate_('setting');
+ this.installInspectorControllerDelegate_('setSetting');
+};
+goog.inherits(devtools.InspectorControllerImpl,
+ devtools.InspectorController);
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.platform = function() {
+ return DevToolsHost.getPlatform();
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.closeWindow = function() {
+ DevToolsHost.closeWindow();
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.attach = function() {
+ DevToolsHost.dockWindow();
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.detach = function() {
+ DevToolsHost.undockWindow();
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.hiddenPanels = function() {
+ return 'databases';
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.search = function(sourceRow, query) {
+ return DevToolsHost.search(sourceRow, query);
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.toggleNodeSearch = function() {
+ devtools.InspectorController.prototype.toggleNodeSearch.call(this);
+ DevToolsHost.toggleInspectElementMode(this.searchingForNode());
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.localizedStringsURL =
+ function(opt_prefix) {
+ // l10n is turned off in test mode because delayed loading of strings
+ // causes test failures.
+ if (false) {
+ var locale = DevToolsHost.getApplicationLocale();
+ locale = locale.replace('_', '-');
+ return 'l10n/localizedStrings_' + locale + '.js';
+ } else {
+ return undefined;
+ }
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.addSourceToFrame =
+ function(mimeType, source, element) {
+ return DevToolsHost.addSourceToFrame(mimeType, source, element);
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.addResourceSourceToFrame =
+ function(identifier, element) {
+ var resource = WebInspector.resources[identifier];
+ if (!resource) {
+ return;
+ }
+ DevToolsHost.addResourceSourceToFrame(identifier, resource.mimeType, element);
+};
+
+
+/**
+ * {@inheritDoc}.
+ */
+devtools.InspectorControllerImpl.prototype.inspectedWindow = function() {
+ return null;
+};
+
+
+/**
+ * @override
+ */
+devtools.InspectorControllerImpl.prototype.debuggerEnabled = function() {
+ return true;
+};
+
+
+devtools.InspectorControllerImpl.prototype.addBreakpoint = function(
+ sourceID, line, condition) {
+ devtools.tools.getDebuggerAgent().addBreakpoint(sourceID, line, condition);
+};
+
+
+devtools.InspectorControllerImpl.prototype.removeBreakpoint = function(
+ sourceID, line) {
+ devtools.tools.getDebuggerAgent().removeBreakpoint(sourceID, line);
+};
+
+devtools.InspectorControllerImpl.prototype.updateBreakpoint = function(
+ sourceID, line, condition) {
+ devtools.tools.getDebuggerAgent().updateBreakpoint(
+ sourceID, line, condition);
+};
+
+devtools.InspectorControllerImpl.prototype.pauseInDebugger = function() {
+ devtools.tools.getDebuggerAgent().pauseExecution();
+};
+
+
+devtools.InspectorControllerImpl.prototype.resumeDebugger = function() {
+ devtools.tools.getDebuggerAgent().resumeExecution();
+};
+
+
+devtools.InspectorControllerImpl.prototype.stepIntoStatementInDebugger =
+ function() {
+ devtools.tools.getDebuggerAgent().stepIntoStatement();
+};
+
+
+devtools.InspectorControllerImpl.prototype.stepOutOfFunctionInDebugger =
+ function() {
+ devtools.tools.getDebuggerAgent().stepOutOfFunction();
+};
+
+
+devtools.InspectorControllerImpl.prototype.stepOverStatementInDebugger =
+ function() {
+ devtools.tools.getDebuggerAgent().stepOverStatement();
+};
+
+
+/**
+ * @override
+ */
+devtools.InspectorControllerImpl.prototype.pauseOnExceptions = function() {
+ return devtools.tools.getDebuggerAgent().pauseOnExceptions();
+};
+
+
+/**
+ * @override
+ */
+devtools.InspectorControllerImpl.prototype.setPauseOnExceptions = function(
+ value) {
+ return devtools.tools.getDebuggerAgent().setPauseOnExceptions(value);
+};
+
+
+/**
+ * @override
+ */
+devtools.InspectorControllerImpl.prototype.startProfiling = function() {
+ devtools.tools.getDebuggerAgent().startProfiling(
+ devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_CPU);
+};
+
+
+/**
+ * @override
+ */
+devtools.InspectorControllerImpl.prototype.stopProfiling = function() {
+ devtools.tools.getDebuggerAgent().stopProfiling(
+ devtools.DebuggerAgent.ProfilerModules.PROFILER_MODULE_CPU);
+};
+
+
+/**
+ * @override
+ */
+devtools.InspectorControllerImpl.prototype.evaluateInCallFrame =
+ function(callFrameId, code, callback) {
+ devtools.tools.getDebuggerAgent().evaluateInCallFrame(callFrameId, code,
+ callback);
+};
+
+
+/**
+ * @override
+ */
+devtools.InspectorControllerImpl.prototype.dispatchOnInjectedScript = function(
+ callId, methodName, argsString) {
+ var callback = function(result, isException) {
+ WebInspector.didDispatchOnInjectedScript(callId,
+ isException ? result : JSON.parse(result),
+ isException);
+ };
+ RemoteToolsAgent.ExecuteUtilityFunction(
+ devtools.Callback.wrap(callback),
+ 'InjectedScript',
+ JSON.stringify(['dispatch', methodName, argsString]));
+};
+
+
+/**
+ * Installs delegating handler into the inspector controller.
+ * @param {string} methodName Method to install delegating handler for.
+ */
+devtools.InspectorControllerImpl.prototype.installInspectorControllerDelegate_
+ = function(methodName) {
+ this[methodName] = goog.bind(this.callInspectorController_, this,
+ methodName);
+};
+
+
+/**
+ * Bound function with the installInjectedScriptDelegate_ actual
+ * implementation.
+ */
+devtools.InspectorControllerImpl.prototype.callInspectorController_ =
+ function(methodName, var_arg) {
+ var args = Array.prototype.slice.call(arguments);
+ RemoteToolsAgent.ExecuteUtilityFunction(
+ devtools.Callback.wrap(function(){}),
+ 'InspectorController', JSON.stringify(args));
+};
+
+
+devtools.InspectorControllerImpl.parseWrap_ = function(callback) {
+ return devtools.Callback.wrap(
+ function(data) {
+ callback.call(this, JSON.parse(data));
+ });
+};
+
+
+InspectorController = new devtools.InspectorControllerImpl();

Powered by Google App Engine
This is Rietveld 408576698