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/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 prefs->RegisterBooleanPref(prefs::kDevToolsOpenDocked, | 72 prefs->RegisterBooleanPref(prefs::kDevToolsOpenDocked, |
73 true, | 73 true, |
74 PrefService::UNSYNCABLE_PREF); | 74 PrefService::UNSYNCABLE_PREF); |
75 prefs->RegisterStringPref(prefs::kDevToolsDockSide, | 75 prefs->RegisterStringPref(prefs::kDevToolsDockSide, |
76 kDockSideBottom, | 76 kDockSideBottom, |
77 PrefService::UNSYNCABLE_PREF); | 77 PrefService::UNSYNCABLE_PREF); |
78 } | 78 } |
79 | 79 |
80 // static | 80 // static |
81 TabContentsWrapper* DevToolsWindow::GetDevToolsContents( | 81 TabContentsWrapper* DevToolsWindow::GetDevToolsContents( |
82 TabContents* inspected_tab) { | 82 WebContents* inspected_tab) { |
83 if (!inspected_tab) | 83 if (!inspected_tab) |
84 return NULL; | 84 return NULL; |
85 | 85 |
86 if (!DevToolsAgentHostRegistry::HasDevToolsAgentHost( | 86 if (!DevToolsAgentHostRegistry::HasDevToolsAgentHost( |
87 inspected_tab->GetRenderViewHost())) | 87 inspected_tab->GetRenderViewHost())) |
88 return NULL; | 88 return NULL; |
89 DevToolsAgentHost* agent = DevToolsAgentHostRegistry::GetDevToolsAgentHost( | 89 DevToolsAgentHost* agent = DevToolsAgentHostRegistry::GetDevToolsAgentHost( |
90 inspected_tab->GetRenderViewHost()); | 90 inspected_tab->GetRenderViewHost()); |
91 DevToolsManager* manager = DevToolsManager::GetInstance(); | 91 DevToolsManager* manager = DevToolsManager::GetInstance(); |
92 DevToolsClientHost* client_host = manager->GetDevToolsClientHostFor(agent); | 92 DevToolsClientHost* client_host = manager->GetDevToolsClientHostFor(agent); |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 content); | 722 content); |
723 } | 723 } |
724 | 724 |
725 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { | 725 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { |
726 if (inspected_tab_ && inspected_tab_->tab_contents()->GetDelegate()) { | 726 if (inspected_tab_ && inspected_tab_->tab_contents()->GetDelegate()) { |
727 return inspected_tab_->tab_contents()->GetDelegate()-> | 727 return inspected_tab_->tab_contents()->GetDelegate()-> |
728 GetJavaScriptDialogCreator(); | 728 GetJavaScriptDialogCreator(); |
729 } | 729 } |
730 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); | 730 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); |
731 } | 731 } |
OLD | NEW |