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

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

Issue 661237: This adds in the ability for Chrome to generate windows with snapshots of all... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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
« no previous file with comments | « base/file_descriptor_posix.h ('k') | chrome/browser/chromeos/frame/browser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser_init.h" 5 #include "chrome/browser/browser_init.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/event_recorder.h" 9 #include "base/event_recorder.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/sys_info.h" 11 #include "base/sys_info.h"
12 #include "chrome/browser/automation/automation_provider.h" 12 #include "chrome/browser/automation/automation_provider.h"
13 #include "chrome/browser/automation/chrome_frame_automation_provider.h" 13 #include "chrome/browser/automation/chrome_frame_automation_provider.h"
14 #include "chrome/browser/browser_list.h" 14 #include "chrome/browser/browser_list.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/browser_window.h" 16 #include "chrome/browser/browser_window.h"
17 #include "chrome/browser/child_process_security_policy.h" 17 #include "chrome/browser/child_process_security_policy.h"
18 #include "chrome/browser/chrome_thread.h" 18 #include "chrome/browser/chrome_thread.h"
19 #include "chrome/browser/defaults.h" 19 #include "chrome/browser/defaults.h"
20 #include "chrome/browser/extensions/extension_creator.h" 20 #include "chrome/browser/extensions/extension_creator.h"
21 #include "chrome/browser/extensions/extensions_service.h" 21 #include "chrome/browser/extensions/extensions_service.h"
22 #include "chrome/browser/first_run.h" 22 #include "chrome/browser/first_run.h"
23 #include "chrome/browser/net/dns_global.h" 23 #include "chrome/browser/net/dns_global.h"
24 #include "chrome/browser/net/url_fixer_upper.h"
24 #include "chrome/browser/notifications/desktop_notification_service.h" 25 #include "chrome/browser/notifications/desktop_notification_service.h"
25 #include "chrome/browser/pref_service.h" 26 #include "chrome/browser/pref_service.h"
26 #include "chrome/browser/profile.h" 27 #include "chrome/browser/profile.h"
27 #include "chrome/browser/renderer_host/render_process_host.h" 28 #include "chrome/browser/renderer_host/render_process_host.h"
28 #include "chrome/browser/search_engines/template_url_model.h" 29 #include "chrome/browser/search_engines/template_url_model.h"
29 #include "chrome/browser/session_startup_pref.h" 30 #include "chrome/browser/session_startup_pref.h"
30 #include "chrome/browser/sessions/session_restore.h" 31 #include "chrome/browser/sessions/session_restore.h"
31 #include "chrome/browser/sessions/session_service.h" 32 #include "chrome/browser/sessions/session_service.h"
32 #include "chrome/browser/shell_integration.h" 33 #include "chrome/browser/shell_integration.h"
33 #include "chrome/browser/tabs/pinned_tab_codec.h" 34 #include "chrome/browser/status_icons/status_tray_manager.h"
34 #include "chrome/browser/tab_contents/infobar_delegate.h" 35 #include "chrome/browser/tab_contents/infobar_delegate.h"
35 #include "chrome/browser/tab_contents/navigation_controller.h" 36 #include "chrome/browser/tab_contents/navigation_controller.h"
36 #include "chrome/browser/tab_contents/tab_contents.h" 37 #include "chrome/browser/tab_contents/tab_contents.h"
37 #include "chrome/browser/tab_contents/tab_contents_view.h" 38 #include "chrome/browser/tab_contents/tab_contents_view.h"
38 #include "chrome/browser/net/url_fixer_upper.h" 39 #include "chrome/browser/tabs/pinned_tab_codec.h"
39 #include "chrome/browser/status_icons/status_tray_manager.h"
40 #include "chrome/browser/user_data_manager.h" 40 #include "chrome/browser/user_data_manager.h"
41 #include "chrome/common/chrome_constants.h" 41 #include "chrome/common/chrome_constants.h"
42 #include "chrome/common/chrome_paths.h" 42 #include "chrome/common/chrome_paths.h"
43 #include "chrome/common/chrome_switches.h" 43 #include "chrome/common/chrome_switches.h"
44 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
45 #include "chrome/common/result_codes.h" 45 #include "chrome/common/result_codes.h"
46 #include "chrome/common/url_constants.h" 46 #include "chrome/common/url_constants.h"
47 #include "chrome/installer/util/browser_distribution.h" 47 #include "chrome/installer/util/browser_distribution.h"
48 #include "grit/chromium_strings.h" 48 #include "grit/chromium_strings.h"
49 #include "grit/generated_resources.h" 49 #include "grit/generated_resources.h"
(...skipping 11 matching lines...) Expand all
61 #if defined(OS_WIN) 61 #if defined(OS_WIN)
62 #include "app/win_util.h" 62 #include "app/win_util.h"
63 #endif 63 #endif
64 64
65 #if defined(TOOLKIT_GTK) 65 #if defined(TOOLKIT_GTK)
66 #include "chrome/browser/gtk/gtk_util.h" 66 #include "chrome/browser/gtk/gtk_util.h"
67 #endif 67 #endif
68 68
69 #if defined(OS_CHROMEOS) 69 #if defined(OS_CHROMEOS)
70 #include "chrome/browser/chromeos/browser_notification_observers.h" 70 #include "chrome/browser/chromeos/browser_notification_observers.h"
71 #include "chrome/browser/dom_ui/mediaplayer_ui.h"
72 #include "chrome/browser/chromeos/cros/cros_library.h" 71 #include "chrome/browser/chromeos/cros/cros_library.h"
73 #include "chrome/browser/chromeos/cros/mount_library.h" 72 #include "chrome/browser/chromeos/cros/mount_library.h"
74 #include "chrome/browser/chromeos/cros/power_library.h" 73 #include "chrome/browser/chromeos/cros/power_library.h"
75 #include "chrome/browser/chromeos/gview_request_interceptor.h" 74 #include "chrome/browser/chromeos/gview_request_interceptor.h"
76 #include "chrome/browser/chromeos/low_battery_observer.h" 75 #include "chrome/browser/chromeos/low_battery_observer.h"
77 #include "chrome/browser/chromeos/usb_mount_observer.h" 76 #include "chrome/browser/chromeos/usb_mount_observer.h"
78 #include "chrome/browser/chromeos/wm_message_listener.h" 77 #include "chrome/browser/chromeos/wm_message_listener.h"
78 #include "chrome/browser/chromeos/wm_overview_controller.h"
79 #include "chrome/browser/dom_ui/mediaplayer_ui.h"
79 #endif 80 #endif
80 81
81 namespace { 82 namespace {
82 83
83 class SetAsDefaultBrowserTask : public Task { 84 class SetAsDefaultBrowserTask : public Task {
84 public: 85 public:
85 SetAsDefaultBrowserTask() { } 86 SetAsDefaultBrowserTask() { }
86 virtual void Run() { 87 virtual void Run() {
87 ShellIntegration::SetAsDefaultBrowser(); 88 ShellIntegration::SetAsDefaultBrowser();
88 } 89 }
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 if (return_code) 392 if (return_code)
392 *return_code = ResultCodes::INVALID_CMDLINE_URL; 393 *return_code = ResultCodes::INVALID_CMDLINE_URL;
393 return false; 394 return false;
394 } 395 }
395 396
396 #if defined(OS_CHROMEOS) 397 #if defined(OS_CHROMEOS)
397 // Create the WmMessageListener so that it can listen for messages regardless 398 // Create the WmMessageListener so that it can listen for messages regardless
398 // of what window has focus. 399 // of what window has focus.
399 chromeos::WmMessageListener::instance(); 400 chromeos::WmMessageListener::instance();
400 401
402 // Create the WmOverviewController so it can register with the listener.
403 chromeos::WmOverviewController::instance();
404
401 // Install the GView request interceptor that will redirect requests 405 // Install the GView request interceptor that will redirect requests
402 // of compatible documents (PDF, etc) to the GView document viewer. 406 // of compatible documents (PDF, etc) to the GView document viewer.
403 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 407 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
404 if (parsed_command_line.HasSwitch(switches::kEnableGView)) { 408 if (parsed_command_line.HasSwitch(switches::kEnableGView)) {
405 chromeos::GViewRequestInterceptor::GetGViewRequestInterceptor(); 409 chromeos::GViewRequestInterceptor::GetGViewRequestInterceptor();
406 } 410 }
407 if (process_startup) { 411 if (process_startup) {
408 // TODO(dhg): Try to make this just USBMountObserver::Get()->set_profile 412 // TODO(dhg): Try to make this just USBMountObserver::Get()->set_profile
409 // and have the constructor take care of everything else. 413 // and have the constructor take care of everything else.
410 chromeos::MountLibrary* lib = 414 chromeos::MountLibrary* lib =
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 scoped_refptr<AutomationProviderClass> automation = 1054 scoped_refptr<AutomationProviderClass> automation =
1051 new AutomationProviderClass(profile); 1055 new AutomationProviderClass(profile);
1052 automation->ConnectToChannel(channel_id); 1056 automation->ConnectToChannel(channel_id);
1053 automation->SetExpectedTabCount(expected_tabs); 1057 automation->SetExpectedTabCount(expected_tabs);
1054 1058
1055 AutomationProviderList* list = 1059 AutomationProviderList* list =
1056 g_browser_process->InitAutomationProviderList(); 1060 g_browser_process->InitAutomationProviderList();
1057 DCHECK(list); 1061 DCHECK(list);
1058 list->AddProvider(automation); 1062 list->AddProvider(automation);
1059 } 1063 }
OLDNEW
« no previous file with comments | « base/file_descriptor_posix.h ('k') | chrome/browser/chromeos/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698