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

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

Issue 10984007: in-chrome viewer for metro (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: only do viewer mode when shift-F11 is pressed, for now Created 8 years, 2 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>
(...skipping 11 matching lines...) Expand all
22 #include "base/win/windows_version.h" 22 #include "base/win/windows_version.h"
23 #include "base/win/wrapped_window_proc.h" 23 #include "base/win/wrapped_window_proc.h"
24 #include "chrome/browser/browser_util_win.h" 24 #include "chrome/browser/browser_util_win.h"
25 #include "chrome/browser/first_run/first_run.h" 25 #include "chrome/browser/first_run/first_run.h"
26 #include "chrome/browser/metrics/metrics_service.h" 26 #include "chrome/browser/metrics/metrics_service.h"
27 #include "chrome/browser/profiles/profile_info_cache.h" 27 #include "chrome/browser/profiles/profile_info_cache.h"
28 #include "chrome/browser/profiles/profile_shortcut_manager.h" 28 #include "chrome/browser/profiles/profile_shortcut_manager.h"
29 #include "chrome/browser/system_monitor/removable_device_notifications_window_wi n.h" 29 #include "chrome/browser/system_monitor/removable_device_notifications_window_wi n.h"
30 #include "chrome/browser/ui/simple_message_box.h" 30 #include "chrome/browser/ui/simple_message_box.h"
31 #include "chrome/browser/ui/uninstall_browser_prompt.h" 31 #include "chrome/browser/ui/uninstall_browser_prompt.h"
32 #include "chrome/browser/viewer/viewer_process_host.h"
32 #include "chrome/common/chrome_constants.h" 33 #include "chrome/common/chrome_constants.h"
33 #include "chrome/common/chrome_result_codes.h" 34 #include "chrome/common/chrome_result_codes.h"
34 #include "chrome/common/chrome_switches.h" 35 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/env_vars.h" 36 #include "chrome/common/env_vars.h"
36 #include "chrome/installer/util/browser_distribution.h" 37 #include "chrome/installer/util/browser_distribution.h"
37 #include "chrome/installer/util/helper.h" 38 #include "chrome/installer/util/helper.h"
38 #include "chrome/installer/util/install_util.h" 39 #include "chrome/installer/util/install_util.h"
39 #include "chrome/installer/util/l10n_string_util.h" 40 #include "chrome/installer/util/l10n_string_util.h"
40 #include "chrome/installer/util/shell_util.h" 41 #include "chrome/installer/util/shell_util.h"
41 #include "content/public/common/main_function_params.h" 42 #include "content/public/common/main_function_params.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 MessageLoopForUI::current()->SetMessageFilter( 205 MessageLoopForUI::current()->SetMessageFilter(
205 tsf_message_filter.PassAs<MessageLoopForUI::MessageFilter>()); 206 tsf_message_filter.PassAs<MessageLoopForUI::MessageFilter>());
206 } 207 }
207 } 208 }
208 } 209 }
209 210
210 void ChromeBrowserMainPartsWin::PreMainMessageLoopRun() { 211 void ChromeBrowserMainPartsWin::PreMainMessageLoopRun() {
211 ChromeBrowserMainParts::PreMainMessageLoopRun(); 212 ChromeBrowserMainParts::PreMainMessageLoopRun();
212 213
213 removable_device_notifications_window_->Init(); 214 removable_device_notifications_window_->Init();
215 viewer_process_host_.reset(new ViewerProcessHost);
214 } 216 }
215 217
216 // static 218 // static
217 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( 219 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment(
218 const CommandLine& parsed_command_line) { 220 const CommandLine& parsed_command_line) {
219 // Clear this var so child processes don't show the dialog by default. 221 // Clear this var so child processes don't show the dialog by default.
220 scoped_ptr<base::Environment> env(base::Environment::Create()); 222 scoped_ptr<base::Environment> env(base::Environment::Create());
221 env->UnSetVar(env_vars::kShowRestart); 223 env->UnSetVar(env_vars::kShowRestart);
222 224
223 // For non-interactive tests we don't restart on crash. 225 // For non-interactive tests we don't restart on crash.
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 if (resource_id) 367 if (resource_id)
366 return l10n_util::GetStringUTF16(resource_id); 368 return l10n_util::GetStringUTF16(resource_id);
367 return string16(); 369 return string16();
368 } 370 }
369 371
370 // static 372 // static
371 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 373 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
372 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 374 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
373 installer::SetTranslationDelegate(&delegate); 375 installer::SetTranslationDelegate(&delegate);
374 } 376 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698