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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 SetupInstallerUtilStrings(); 195 SetupInstallerUtilStrings();
196 196
197 ChromeBrowserMainParts::PreMainMessageLoopStart(); 197 ChromeBrowserMainParts::PreMainMessageLoopStart();
198 if (!parameters().ui_task) { 198 if (!parameters().ui_task) {
199 // Make sure that we know how to handle exceptions from the message loop. 199 // Make sure that we know how to handle exceptions from the message loop.
200 InitializeWindowProcExceptions(); 200 InitializeWindowProcExceptions();
201 } 201 }
202 } 202 }
203 203
204 void ChromeBrowserMainPartsWin::PostMainMessageLoopStart() { 204 void ChromeBrowserMainPartsWin::PostMainMessageLoopStart() {
205 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); 205 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
206 206
207 if (base::win::IsTSFAwareRequired()) { 207 if (base::win::IsTSFAwareRequired()) {
208 // Create a TSF message filter for the message loop. MessageLoop takes 208 // Create a TSF message filter for the message loop. MessageLoop takes
209 // ownership of the filter. 209 // ownership of the filter.
210 scoped_ptr<base::win::TextServicesMessageFilter> tsf_message_filter( 210 scoped_ptr<base::win::TextServicesMessageFilter> tsf_message_filter(
211 new base::win::TextServicesMessageFilter); 211 new base::win::TextServicesMessageFilter);
212 if (tsf_message_filter->Init()) { 212 if (tsf_message_filter->Init()) {
213 MessageLoopForUI::current()->SetMessageFilter( 213 base::MessageLoopForUI::current()->SetMessageFilter(
214 tsf_message_filter.PassAs<MessageLoopForUI::MessageFilter>()); 214 tsf_message_filter.PassAs<base::MessageLoopForUI::MessageFilter>());
215 } 215 }
216 } 216 }
217 } 217 }
218 218
219 void ChromeBrowserMainPartsWin::PreProfileInit() { 219 void ChromeBrowserMainPartsWin::PreProfileInit() {
220 storage_monitor_.reset(chrome::StorageMonitorWin::Create()); 220 storage_monitor_.reset(chrome::StorageMonitorWin::Create());
221 221
222 ChromeBrowserMainParts::PreProfileInit(); 222 ChromeBrowserMainParts::PreProfileInit();
223 } 223 }
224 224
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 if (resource_id) 403 if (resource_id)
404 return l10n_util::GetStringUTF16(resource_id); 404 return l10n_util::GetStringUTF16(resource_id);
405 return string16(); 405 return string16();
406 } 406 }
407 407
408 // static 408 // static
409 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 409 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
410 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 410 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
411 installer::SetTranslationDelegate(&delegate); 411 installer::SetTranslationDelegate(&delegate);
412 } 412 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698