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

Side by Side Diff: chrome/browser/extensions/api/identity/experimental_web_auth_flow.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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/extensions/api/identity/experimental_web_auth_flow.h" 5 #include "chrome/browser/extensions/api/identity/experimental_web_auth_flow.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 controller->LoadURL( 79 controller->LoadURL(
80 provider_url_, 80 provider_url_,
81 content::Referrer(), 81 content::Referrer(),
82 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 82 content::PAGE_TRANSITION_AUTO_TOPLEVEL,
83 std::string()); 83 std::string());
84 } 84 }
85 85
86 void ExperimentalWebAuthFlow::DetachDelegateAndDelete() { 86 void ExperimentalWebAuthFlow::DetachDelegateAndDelete() {
87 delegate_ = NULL; 87 delegate_ = NULL;
88 MessageLoop::current()->DeleteSoon(FROM_HERE, this); 88 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
89 } 89 }
90 90
91 WebContents* ExperimentalWebAuthFlow::CreateWebContents() { 91 WebContents* ExperimentalWebAuthFlow::CreateWebContents() {
92 return WebContents::Create(WebContents::CreateParams(profile_)); 92 return WebContents::Create(WebContents::CreateParams(profile_));
93 } 93 }
94 94
95 void ExperimentalWebAuthFlow::ShowAuthFlowPopup() { 95 void ExperimentalWebAuthFlow::ShowAuthFlowPopup() {
96 Browser::CreateParams browser_params(Browser::TYPE_POPUP, profile_, 96 Browser::CreateParams browser_params(Browser::TYPE_POPUP, profile_,
97 host_desktop_type_); 97 host_desktop_type_);
98 browser_params.initial_bounds = initial_bounds_; 98 browser_params.initial_bounds = initial_bounds_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 AfterUrlLoaded(); 158 AfterUrlLoaded();
159 } 159 }
160 160
161 void ExperimentalWebAuthFlow::WebContentsDestroyed(WebContents* web_contents) { 161 void ExperimentalWebAuthFlow::WebContentsDestroyed(WebContents* web_contents) {
162 contents_ = NULL; 162 contents_ = NULL;
163 if (delegate_) 163 if (delegate_)
164 delegate_->OnAuthFlowFailure(ExperimentalWebAuthFlow::WINDOW_CLOSED); 164 delegate_->OnAuthFlowFailure(ExperimentalWebAuthFlow::WINDOW_CLOSED);
165 } 165 }
166 166
167 } // namespace extensions 167 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698