| Index: chrome/browser/extensions/api/identity/web_auth_flow.cc
|
| diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.cc b/chrome/browser/extensions/api/identity/web_auth_flow.cc
|
| index 0a08e7ed94cbd50c568eeaf2dc3e279a377dda8e..2a5ea29d5afefa8b60227d6bd566f48d38934027 100644
|
| --- a/chrome/browser/extensions/api/identity/web_auth_flow.cc
|
| +++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc
|
| @@ -48,11 +48,13 @@ WebAuthFlow::WebAuthFlow(
|
| Profile* profile,
|
| const std::string& extension_id,
|
| const GURL& provider_url,
|
| - Mode mode)
|
| + Mode mode,
|
| + const gfx::Rect& initial_bounds)
|
| : delegate_(delegate),
|
| profile_(profile),
|
| provider_url_(provider_url),
|
| mode_(mode),
|
| + initial_bounds_(initial_bounds),
|
| contents_(NULL),
|
| tab_contents_(NULL) {
|
| InitValidRedirectUrlPrefixes(extension_id);
|
| @@ -110,8 +112,9 @@ void WebAuthFlow::ShowAuthFlowPopup() {
|
| // Pass ownership of WebContents to TabContents.
|
| tab_contents_ = TabContents::Factory::CreateTabContents(contents_);
|
| contents_ = NULL;
|
| - Browser* browser = new Browser(Browser::CreateParams(
|
| - Browser::TYPE_POPUP, profile_));
|
| + Browser::CreateParams browser_params(Browser::TYPE_POPUP, profile_);
|
| + browser_params.initial_bounds = initial_bounds_;
|
| + Browser* browser = new Browser(browser_params);
|
| chrome::NavigateParams params(browser, tab_contents_);
|
| params.disposition = CURRENT_TAB;
|
| params.window_action = chrome::NavigateParams::SHOW_WINDOW;
|
| @@ -170,6 +173,8 @@ void WebAuthFlow::Observe(int type,
|
| break;
|
| case content::NOTIFICATION_WEB_CONTENTS_DESTROYED: {
|
| // User closed the auth flow window; report a failure.
|
| + contents_ = NULL;
|
| + tab_contents_ = NULL;
|
| ReportResult(GURL());
|
| }
|
| break;
|
|
|