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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 6713082: Move WebUIFactory to chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 9 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #include "chrome/browser/ui/options/options_window.h" 78 #include "chrome/browser/ui/options/options_window.h"
79 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" 79 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
80 #include "chrome/browser/ui/status_bubble.h" 80 #include "chrome/browser/ui/status_bubble.h"
81 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 81 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
82 #include "chrome/browser/ui/tabs/dock_info.h" 82 #include "chrome/browser/ui/tabs/dock_info.h"
83 #include "chrome/browser/ui/tabs/tab_menu_model.h" 83 #include "chrome/browser/ui/tabs/tab_menu_model.h"
84 #include "chrome/browser/ui/web_applications/web_app_ui.h" 84 #include "chrome/browser/ui/web_applications/web_app_ui.h"
85 #include "chrome/browser/ui/webui/bug_report_ui.h" 85 #include "chrome/browser/ui/webui/bug_report_ui.h"
86 #include "chrome/browser/ui/webui/filebrowse_ui.h" 86 #include "chrome/browser/ui/webui/filebrowse_ui.h"
87 #include "chrome/browser/ui/webui/options/content_settings_handler.h" 87 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
88 #include "chrome/browser/ui/webui/web_ui_factory.h"
88 #include "chrome/browser/ui/window_sizer.h" 89 #include "chrome/browser/ui/window_sizer.h"
89 #include "chrome/browser/upgrade_detector.h" 90 #include "chrome/browser/upgrade_detector.h"
90 #include "chrome/browser/web_applications/web_app.h" 91 #include "chrome/browser/web_applications/web_app.h"
91 #include "chrome/common/chrome_constants.h" 92 #include "chrome/common/chrome_constants.h"
92 #include "chrome/common/chrome_switches.h" 93 #include "chrome/common/chrome_switches.h"
93 #include "chrome/common/content_restriction.h" 94 #include "chrome/common/content_restriction.h"
94 #include "chrome/common/extensions/extension.h" 95 #include "chrome/common/extensions/extension.h"
95 #include "chrome/common/extensions/extension_constants.h" 96 #include "chrome/common/extensions/extension_constants.h"
96 #include "chrome/common/pref_names.h" 97 #include "chrome/common/pref_names.h"
97 #include "chrome/common/profiling.h" 98 #include "chrome/common/profiling.h"
98 #include "chrome/common/url_constants.h" 99 #include "chrome/common/url_constants.h"
99 #include "chrome/common/web_apps.h" 100 #include "chrome/common/web_apps.h"
100 #include "content/browser/host_zoom_map.h" 101 #include "content/browser/host_zoom_map.h"
101 #include "content/browser/renderer_host/render_view_host.h" 102 #include "content/browser/renderer_host/render_view_host.h"
102 #include "content/browser/site_instance.h" 103 #include "content/browser/site_instance.h"
103 #include "content/browser/tab_contents/interstitial_page.h" 104 #include "content/browser/tab_contents/interstitial_page.h"
104 #include "content/browser/tab_contents/navigation_controller.h" 105 #include "content/browser/tab_contents/navigation_controller.h"
105 #include "content/browser/tab_contents/navigation_entry.h" 106 #include "content/browser/tab_contents/navigation_entry.h"
106 #include "content/browser/tab_contents/tab_contents.h" 107 #include "content/browser/tab_contents/tab_contents.h"
107 #include "content/browser/tab_contents/tab_contents_view.h" 108 #include "content/browser/tab_contents/tab_contents_view.h"
109 #include "content/browser/webui/web_ui_register.h"
108 #include "content/common/notification_service.h" 110 #include "content/common/notification_service.h"
109 #include "content/common/page_transition_types.h" 111 #include "content/common/page_transition_types.h"
110 #include "grit/chromium_strings.h" 112 #include "grit/chromium_strings.h"
111 #include "grit/generated_resources.h" 113 #include "grit/generated_resources.h"
112 #include "grit/locale_settings.h" 114 #include "grit/locale_settings.h"
113 #include "net/base/cookie_monster.h" 115 #include "net/base/cookie_monster.h"
114 #include "net/base/net_util.h" 116 #include "net/base/net_util.h"
115 #include "net/base/registry_controlled_domain.h" 117 #include "net/base/registry_controlled_domain.h"
116 #include "net/base/static_cookie_policy.h" 118 #include "net/base/static_cookie_policy.h"
117 #include "net/url_request/url_request_context.h" 119 #include "net/url_request/url_request_context.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 NotificationService::AllSources()); 229 NotificationService::AllSources());
228 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, 230 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
229 NotificationService::AllSources()); 231 NotificationService::AllSources());
230 registrar_.Add(this, NotificationType::PROFILE_ERROR, 232 registrar_.Add(this, NotificationType::PROFILE_ERROR,
231 NotificationService::AllSources()); 233 NotificationService::AllSources());
232 234
233 // Need to know when to alert the user of theme install delay. 235 // Need to know when to alert the user of theme install delay.
234 registrar_.Add(this, NotificationType::EXTENSION_READY_FOR_INSTALL, 236 registrar_.Add(this, NotificationType::EXTENSION_READY_FOR_INSTALL,
235 NotificationService::AllSources()); 237 NotificationService::AllSources());
236 238
239 WebUIRegister::RegisterSource(WebUIFactory::GetInstance());
240
237 // NOTE: These prefs all need to be explicitly destroyed in the destructor 241 // NOTE: These prefs all need to be explicitly destroyed in the destructor
238 // or you'll get a nasty surprise when you run the incognito tests. 242 // or you'll get a nasty surprise when you run the incognito tests.
239 PrefService* local_state = g_browser_process->local_state(); 243 PrefService* local_state = g_browser_process->local_state();
240 if (local_state) 244 if (local_state)
241 printing_enabled_.Init(prefs::kPrintingEnabled, local_state, this); 245 printing_enabled_.Init(prefs::kPrintingEnabled, local_state, this);
242 dev_tools_disabled_.Init(prefs::kDevToolsDisabled, 246 dev_tools_disabled_.Init(prefs::kDevToolsDisabled,
243 profile_->GetPrefs(), this); 247 profile_->GetPrefs(), this);
244 incognito_mode_allowed_.Init(prefs::kIncognitoEnabled, 248 incognito_mode_allowed_.Init(prefs::kIncognitoEnabled,
245 profile_->GetPrefs(), this); 249 profile_->GetPrefs(), this);
246 250
(...skipping 4183 matching lines...) Expand 10 before | Expand all | Expand 10 after
4430 // The page transition below is only for the purpose of inserting the tab. 4434 // The page transition below is only for the purpose of inserting the tab.
4431 browser->AddTab(view_source_contents, PageTransition::LINK); 4435 browser->AddTab(view_source_contents, PageTransition::LINK);
4432 } 4436 }
4433 4437
4434 if (profile_->HasSessionService()) { 4438 if (profile_->HasSessionService()) {
4435 SessionService* session_service = profile_->GetSessionService(); 4439 SessionService* session_service = profile_->GetSessionService();
4436 if (session_service) 4440 if (session_service)
4437 session_service->TabRestored(&view_source_contents->controller(), false); 4441 session_service->TabRestored(&view_source_contents->controller(), false);
4438 } 4442 }
4439 } 4443 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698