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/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 GURL(), | 157 GURL(), |
158 content::PAGE_TRANSITION_START_PAGE, | 158 content::PAGE_TRANSITION_START_PAGE, |
159 std::string()); | 159 std::string()); |
160 return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked); | 160 return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked); |
161 } | 161 } |
162 | 162 |
163 DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents, | 163 DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents, |
164 Profile* profile, | 164 Profile* profile, |
165 RenderViewHost* inspected_rvh, | 165 RenderViewHost* inspected_rvh, |
166 bool docked) | 166 bool docked) |
167 : RenderViewHostObserver(tab_contents->render_view_host()), | 167 : content::RenderViewHostObserver(tab_contents->render_view_host()), |
168 profile_(profile), | 168 profile_(profile), |
169 inspected_tab_(NULL), | 169 inspected_tab_(NULL), |
170 tab_contents_(tab_contents), | 170 tab_contents_(tab_contents), |
171 browser_(NULL), | 171 browser_(NULL), |
172 docked_(docked), | 172 docked_(docked), |
173 is_loaded_(false), | 173 is_loaded_(false), |
174 action_on_load_(DEVTOOLS_TOGGLE_ACTION_NONE) { | 174 action_on_load_(DEVTOOLS_TOGGLE_ACTION_NONE) { |
175 g_instances.Get().push_back(this); | 175 g_instances.Get().push_back(this); |
176 // Wipe out page icon so that the default application icon is used. | 176 // Wipe out page icon so that the default application icon is used. |
177 NavigationEntry* entry = tab_contents_->controller().GetActiveEntry(); | 177 NavigationEntry* entry = tab_contents_->controller().GetActiveEntry(); |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 RequestSetDocked(false); | 699 RequestSetDocked(false); |
700 } | 700 } |
701 | 701 |
702 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { | 702 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { |
703 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { | 703 if (inspected_tab_ && inspected_tab_->tab_contents()->delegate()) { |
704 return inspected_tab_->tab_contents()->delegate()-> | 704 return inspected_tab_->tab_contents()->delegate()-> |
705 GetJavaScriptDialogCreator(); | 705 GetJavaScriptDialogCreator(); |
706 } | 706 } |
707 return TabContentsDelegate::GetJavaScriptDialogCreator(); | 707 return TabContentsDelegate::GetJavaScriptDialogCreator(); |
708 } | 708 } |
OLD | NEW |