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