| OLD | NEW |
| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // ownership of the filter. | 197 // ownership of the filter. |
| 198 scoped_ptr<base::win::TextServicesMessageFilter> tsf_message_filter( | 198 scoped_ptr<base::win::TextServicesMessageFilter> tsf_message_filter( |
| 199 new base::win::TextServicesMessageFilter); | 199 new base::win::TextServicesMessageFilter); |
| 200 if (tsf_message_filter->Init()) { | 200 if (tsf_message_filter->Init()) { |
| 201 MessageLoopForUI::current()->SetMessageFilter( | 201 MessageLoopForUI::current()->SetMessageFilter( |
| 202 tsf_message_filter.PassAs<MessageLoopForUI::MessageFilter>()); | 202 tsf_message_filter.PassAs<MessageLoopForUI::MessageFilter>()); |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 void ChromeBrowserMainPartsWin::PreMainMessageLoopRun() { |
| 208 ChromeBrowserMainParts::PreMainMessageLoopRun(); |
| 209 |
| 210 removable_device_notifications_window_->Init(); |
| 211 } |
| 212 |
| 207 // static | 213 // static |
| 208 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( | 214 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
| 209 const CommandLine& parsed_command_line) { | 215 const CommandLine& parsed_command_line) { |
| 210 // Clear this var so child processes don't show the dialog by default. | 216 // Clear this var so child processes don't show the dialog by default. |
| 211 scoped_ptr<base::Environment> env(base::Environment::Create()); | 217 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 212 env->UnSetVar(env_vars::kShowRestart); | 218 env->UnSetVar(env_vars::kShowRestart); |
| 213 | 219 |
| 214 // For non-interactive tests we don't restart on crash. | 220 // For non-interactive tests we don't restart on crash. |
| 215 if (env->HasVar(env_vars::kHeadless)) | 221 if (env->HasVar(env_vars::kHeadless)) |
| 216 return; | 222 return; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 if (resource_id) | 362 if (resource_id) |
| 357 return l10n_util::GetStringUTF16(resource_id); | 363 return l10n_util::GetStringUTF16(resource_id); |
| 358 return string16(); | 364 return string16(); |
| 359 } | 365 } |
| 360 | 366 |
| 361 // static | 367 // static |
| 362 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 368 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 363 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 369 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 364 installer::SetTranslationDelegate(&delegate); | 370 installer::SetTranslationDelegate(&delegate); |
| 365 } | 371 } |
| OLD | NEW |