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

Side by Side Diff: chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/extensions/app_metro_infobar_delegate_win.h" 5 #include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h"
6 6
7 #include "apps/app_launch_for_metro_restart_win.h" 7 #include "apps/app_launch_for_metro_restart_win.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 content::PAGE_TRANSITION_LINK, false); 46 content::PAGE_TRANSITION_LINK, false);
47 content::WebContents* web_contents = browser->OpenURL(params); 47 content::WebContents* web_contents = browser->OpenURL(params);
48 InfoBarService* info_bar_service = 48 InfoBarService* info_bar_service =
49 InfoBarService::FromWebContents(web_contents); 49 InfoBarService::FromWebContents(web_contents);
50 info_bar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>( 50 info_bar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
51 new AppMetroInfoBarDelegateWin(info_bar_service, mode, extension_id))); 51 new AppMetroInfoBarDelegateWin(info_bar_service, mode, extension_id)));
52 52
53 // Use PostTask because we can get here in a COM SendMessage, and 53 // Use PostTask because we can get here in a COM SendMessage, and
54 // ActivateApplication can not be sent nested (returns error 54 // ActivateApplication can not be sent nested (returns error
55 // RPC_E_CANTCALLOUT_ININPUTSYNCCALL). 55 // RPC_E_CANTCALLOUT_ININPUTSYNCCALL).
56 MessageLoop::current()->PostTask( 56 base::MessageLoop::current()->PostTask(
57 FROM_HERE, 57 FROM_HERE, base::Bind(base::IgnoreResult(chrome::ActivateMetroChrome)));
58 base::Bind(base::IgnoreResult(chrome::ActivateMetroChrome)));
59 } 58 }
60 59
61 AppMetroInfoBarDelegateWin::AppMetroInfoBarDelegateWin( 60 AppMetroInfoBarDelegateWin::AppMetroInfoBarDelegateWin(
62 InfoBarService* info_bar_service, 61 InfoBarService* info_bar_service,
63 Mode mode, 62 Mode mode,
64 const std::string& extension_id) 63 const std::string& extension_id)
65 : ConfirmInfoBarDelegate(info_bar_service), 64 : ConfirmInfoBarDelegate(info_bar_service),
66 mode_(mode), 65 mode_(mode),
67 extension_id_(extension_id) { 66 extension_id_(extension_id) {
68 DCHECK_EQ(mode_ == SHOW_APP_LIST, extension_id_.empty()); 67 DCHECK_EQ(mode_ == SHOW_APP_LIST, extension_id_.empty());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 content::OpenURLParams params( 116 content::OpenURLParams params(
118 GURL("https://support.google.com/chrome/?p=ib_redirect_to_desktop"), 117 GURL("https://support.google.com/chrome/?p=ib_redirect_to_desktop"),
119 content::Referrer(), 118 content::Referrer(),
120 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 119 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
121 content::PAGE_TRANSITION_LINK, false); 120 content::PAGE_TRANSITION_LINK, false);
122 web_contents()->OpenURL(params); 121 web_contents()->OpenURL(params);
123 return false; 122 return false;
124 } 123 }
125 124
126 } // namespace chrome 125 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698