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

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 8956059: Rename NavigationController to NavigationControllerImpl and put it into the content namespace. Al... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 namespace { 51 namespace {
52 base::LazyInstance<DevToolsWindowList, 52 base::LazyInstance<DevToolsWindowList,
53 base::LeakyLazyInstanceTraits<DevToolsWindowList> > 53 base::LeakyLazyInstanceTraits<DevToolsWindowList> >
54 g_instances = LAZY_INSTANCE_INITIALIZER; 54 g_instances = LAZY_INSTANCE_INITIALIZER;
55 } // namespace 55 } // namespace
56 56
57 using content::DevToolsAgentHost; 57 using content::DevToolsAgentHost;
58 using content::DevToolsAgentHostRegistry; 58 using content::DevToolsAgentHostRegistry;
59 using content::DevToolsClientHost; 59 using content::DevToolsClientHost;
60 using content::DevToolsManager; 60 using content::DevToolsManager;
61 using content::NavigationEntry;
61 using content::OpenURLParams; 62 using content::OpenURLParams;
62 using content::WebContents; 63 using content::WebContents;
63 64
64 const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp"; 65 const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp";
65 66
66 // static 67 // static
67 void DevToolsWindow::RegisterUserPrefs(PrefService* prefs) { 68 void DevToolsWindow::RegisterUserPrefs(PrefService* prefs) {
68 prefs->RegisterBooleanPref(prefs::kDevToolsOpenDocked, 69 prefs->RegisterBooleanPref(prefs::kDevToolsOpenDocked,
69 true, 70 true,
70 PrefService::UNSYNCABLE_PREF); 71 PrefService::UNSYNCABLE_PREF);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 browser_(NULL), 184 browser_(NULL),
184 docked_(docked), 185 docked_(docked),
185 is_loaded_(false), 186 is_loaded_(false),
186 action_on_load_(DEVTOOLS_TOGGLE_ACTION_NONE), 187 action_on_load_(DEVTOOLS_TOGGLE_ACTION_NONE),
187 frontend_host_(NULL) { 188 frontend_host_(NULL) {
188 frontend_host_ = DevToolsClientHost::CreateDevToolsFrontendHost( 189 frontend_host_ = DevToolsClientHost::CreateDevToolsFrontendHost(
189 tab_contents->tab_contents(), 190 tab_contents->tab_contents(),
190 this); 191 this);
191 g_instances.Get().push_back(this); 192 g_instances.Get().push_back(this);
192 // Wipe out page icon so that the default application icon is used. 193 // Wipe out page icon so that the default application icon is used.
193 content::NavigationEntry* entry = 194 NavigationEntry* entry =
194 tab_contents_->tab_contents()->GetController().GetActiveEntry(); 195 tab_contents_->tab_contents()->GetController().GetActiveEntry();
195 entry->GetFavicon().bitmap = SkBitmap(); 196 entry->GetFavicon().bitmap = SkBitmap();
196 entry->GetFavicon().valid = true; 197 entry->GetFavicon().valid = true;
197 198
198 // Register on-load actions. 199 // Register on-load actions.
199 registrar_.Add( 200 registrar_.Add(
200 this, 201 this,
201 content::NOTIFICATION_LOAD_STOP, 202 content::NOTIFICATION_LOAD_STOP,
202 content::Source<NavigationController>( 203 content::Source<NavigationController>(
203 &tab_contents_->tab_contents()->GetController())); 204 &tab_contents_->tab_contents()->GetController()));
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 content); 694 content);
694 } 695 }
695 696
696 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() { 697 content::JavaScriptDialogCreator* DevToolsWindow::GetJavaScriptDialogCreator() {
697 if (inspected_tab_ && inspected_tab_->tab_contents()->GetDelegate()) { 698 if (inspected_tab_ && inspected_tab_->tab_contents()->GetDelegate()) {
698 return inspected_tab_->tab_contents()->GetDelegate()-> 699 return inspected_tab_->tab_contents()->GetDelegate()->
699 GetJavaScriptDialogCreator(); 700 GetJavaScriptDialogCreator();
700 } 701 }
701 return content::WebContentsDelegate::GetJavaScriptDialogCreator(); 702 return content::WebContentsDelegate::GetJavaScriptDialogCreator();
702 } 703 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.cc ('k') | chrome/browser/download/download_request_limiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698