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

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

Issue 10332190: Add SystemMonitor::GetMediaDevices() (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix win Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_browser_main_win.h" 5 #include "chrome/browser/chrome_browser_main_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/environment.h" 13 #include "base/environment.h"
14 #include "base/i18n/rtl.h" 14 #include "base/i18n/rtl.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/scoped_native_library.h" 17 #include "base/scoped_native_library.h"
18 #include "base/string_number_conversions.h" 18 #include "base/string_number_conversions.h"
19 #include "base/utf_string_conversions.h" 19 #include "base/utf_string_conversions.h"
20 #include "base/win/metro.h" 20 #include "base/win/metro.h"
21 #include "base/win/windows_version.h" 21 #include "base/win/windows_version.h"
22 #include "base/win/wrapped_window_proc.h" 22 #include "base/win/wrapped_window_proc.h"
23 #include "chrome/browser/browser_util_win.h" 23 #include "chrome/browser/browser_util_win.h"
24 #include "chrome/browser/first_run/first_run.h" 24 #include "chrome/browser/first_run/first_run.h"
25 #include "chrome/browser/media_gallery/media_device_notifications_window_win.h"
26 #include "chrome/browser/metrics/metrics_service.h" 25 #include "chrome/browser/metrics/metrics_service.h"
27 #include "chrome/browser/profiles/profile_info_cache.h" 26 #include "chrome/browser/profiles/profile_info_cache.h"
28 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" 27 #include "chrome/browser/profiles/profile_shortcut_manager_win.h"
29 #include "chrome/browser/ui/simple_message_box.h" 28 #include "chrome/browser/ui/simple_message_box.h"
30 #include "chrome/browser/ui/uninstall_browser_prompt.h" 29 #include "chrome/browser/ui/uninstall_browser_prompt.h"
31 #include "chrome/common/chrome_constants.h" 30 #include "chrome/common/chrome_constants.h"
32 #include "chrome/common/chrome_result_codes.h" 31 #include "chrome/common/chrome_result_codes.h"
33 #include "chrome/common/chrome_switches.h" 32 #include "chrome/common/chrome_switches.h"
34 #include "chrome/common/env_vars.h" 33 #include "chrome/common/env_vars.h"
35 #include "chrome/installer/util/browser_distribution.h" 34 #include "chrome/installer/util/browser_distribution.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 gfx::PlatformFontWin::adjust_font_callback = &AdjustUIFont; 163 gfx::PlatformFontWin::adjust_font_callback = &AdjustUIFont;
165 gfx::PlatformFontWin::get_minimum_font_size_callback = &GetMinimumFontSize; 164 gfx::PlatformFontWin::get_minimum_font_size_callback = &GetMinimumFontSize;
166 } 165 }
167 166
168 void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() { 167 void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() {
169 ChromeBrowserMainParts::PreMainMessageLoopStart(); 168 ChromeBrowserMainParts::PreMainMessageLoopStart();
170 if (!parameters().ui_task) { 169 if (!parameters().ui_task) {
171 // Make sure that we know how to handle exceptions from the message loop. 170 // Make sure that we know how to handle exceptions from the message loop.
172 InitializeWindowProcExceptions(); 171 InitializeWindowProcExceptions();
173 } 172 }
174 media_device_notifications_window_.reset(
175 new chrome::MediaDeviceNotificationsWindowWin());
176 } 173 }
177 174
178 // static 175 // static
179 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( 176 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment(
180 const CommandLine& parsed_command_line) { 177 const CommandLine& parsed_command_line) {
181 // Clear this var so child processes don't show the dialog by default. 178 // Clear this var so child processes don't show the dialog by default.
182 scoped_ptr<base::Environment> env(base::Environment::Create()); 179 scoped_ptr<base::Environment> env(base::Environment::Create());
183 env->UnSetVar(env_vars::kShowRestart); 180 env->UnSetVar(env_vars::kShowRestart);
184 181
185 // For non-interactive tests we don't restart on crash. 182 // For non-interactive tests we don't restart on crash.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall); 298 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall);
302 uninstall_cmd.AppendSwitch( 299 uninstall_cmd.AppendSwitch(
303 installer::switches::kDoNotRemoveSharedItems); 300 installer::switches::kDoNotRemoveSharedItems);
304 base::LaunchProcess(uninstall_cmd, base::LaunchOptions(), NULL); 301 base::LaunchProcess(uninstall_cmd, base::LaunchOptions(), NULL);
305 } 302 }
306 return true; 303 return true;
307 } 304 }
308 } 305 }
309 return false; 306 return false;
310 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698