| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 void DevToolsWindow::UpdateFrontendAttachedState() { | 366 void DevToolsWindow::UpdateFrontendAttachedState() { |
| 367 tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame( | 367 tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame( |
| 368 string16(), | 368 string16(), |
| 369 docked_ ? ASCIIToUTF16("WebInspector.setAttachedWindow(true);") | 369 docked_ ? ASCIIToUTF16("WebInspector.setAttachedWindow(true);") |
| 370 : ASCIIToUTF16("WebInspector.setAttachedWindow(false);")); | 370 : ASCIIToUTF16("WebInspector.setAttachedWindow(false);")); |
| 371 } | 371 } |
| 372 | 372 |
| 373 | 373 |
| 374 void DevToolsWindow::AddDevToolsExtensionsToClient() { | 374 void DevToolsWindow::AddDevToolsExtensionsToClient() { |
| 375 if (inspected_tab_) { | 375 if (inspected_tab_) { |
| 376 FundamentalValue tabId( | 376 base::FundamentalValue tabId( |
| 377 inspected_tab_->restore_tab_helper()->session_id().id()); | 377 inspected_tab_->restore_tab_helper()->session_id().id()); |
| 378 CallClientFunction(ASCIIToUTF16("WebInspector.setInspectedTabId"), tabId); | 378 CallClientFunction(ASCIIToUTF16("WebInspector.setInspectedTabId"), tabId); |
| 379 } | 379 } |
| 380 ListValue results; | 380 ListValue results; |
| 381 const ExtensionService* extension_service = | 381 const ExtensionService* extension_service = |
| 382 tab_contents_->profile()->GetOriginalProfile()->GetExtensionService(); | 382 tab_contents_->profile()->GetOriginalProfile()->GetExtensionService(); |
| 383 if (!extension_service) | 383 if (!extension_service) |
| 384 return; | 384 return; |
| 385 | 385 |
| 386 const ExtensionList* extensions = extension_service->extensions(); | 386 const ExtensionList* extensions = extension_service->extensions(); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 return NULL; | 602 return NULL; |
| 603 } | 603 } |
| 604 | 604 |
| 605 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { | 605 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { |
| 606 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { | 606 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { |
| 607 return inspected_tab_->tab_contents()->delegate()-> | 607 return inspected_tab_->tab_contents()->delegate()-> |
| 608 GetJavaScriptDialogCreator(); | 608 GetJavaScriptDialogCreator(); |
| 609 } | 609 } |
| 610 return TabContentsDelegate::GetJavaScriptDialogCreator(); | 610 return TabContentsDelegate::GetJavaScriptDialogCreator(); |
| 611 } | 611 } |
| OLD | NEW |