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

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: fix include 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>
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/text_services_message_filter.h" 21 #include "base/win/text_services_message_filter.h"
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/metro_viewer/metro_viewer_process_host_win.h"
27 #include "chrome/browser/profiles/profile_info_cache.h" 28 #include "chrome/browser/profiles/profile_info_cache.h"
28 #include "chrome/browser/profiles/profile_shortcut_manager.h" 29 #include "chrome/browser/profiles/profile_shortcut_manager.h"
29 #include "chrome/browser/system_monitor/removable_device_notifications_window_wi n.h" 30 #include "chrome/browser/system_monitor/removable_device_notifications_window_wi n.h"
30 #include "chrome/browser/ui/simple_message_box.h" 31 #include "chrome/browser/ui/simple_message_box.h"
31 #include "chrome/browser/ui/uninstall_browser_prompt.h" 32 #include "chrome/browser/ui/uninstall_browser_prompt.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"
(...skipping 167 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 #if defined(USE_AURA)
216 metro_viewer_process_host_.reset(new MetroViewerProcessHost);
217 #endif
214 } 218 }
215 219
216 // static 220 // static
217 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( 221 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment(
218 const CommandLine& parsed_command_line) { 222 const CommandLine& parsed_command_line) {
219 // Clear this var so child processes don't show the dialog by default. 223 // Clear this var so child processes don't show the dialog by default.
220 scoped_ptr<base::Environment> env(base::Environment::Create()); 224 scoped_ptr<base::Environment> env(base::Environment::Create());
221 env->UnSetVar(env_vars::kShowRestart); 225 env->UnSetVar(env_vars::kShowRestart);
222 226
223 // For non-interactive tests we don't restart on crash. 227 // 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) 369 if (resource_id)
366 return l10n_util::GetStringUTF16(resource_id); 370 return l10n_util::GetStringUTF16(resource_id);
367 return string16(); 371 return string16();
368 } 372 }
369 373
370 // static 374 // static
371 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 375 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
372 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 376 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
373 installer::SetTranslationDelegate(&delegate); 377 installer::SetTranslationDelegate(&delegate);
374 } 378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698