| 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 dd76b47244194855d01f6c31b50b4eb0c8e9122e..3f2d9454f1b297ca13655721ebfac204144cf477 100644
|
| --- a/chrome/browser/extensions/api/identity/web_auth_flow.cc
|
| +++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc
|
| @@ -5,11 +5,13 @@
|
| #include "chrome/browser/extensions/api/identity/web_auth_flow.h"
|
|
|
| #include "base/location.h"
|
| +#include "base/utf_string_conversions.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_navigator.h"
|
| #include "content/public/browser/load_notification_details.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| +#include "content/public/browser/navigation_entry.h"
|
| #include "content/public/browser/notification_details.h"
|
| #include "content/public/browser/notification_source.h"
|
| #include "content/public/browser/notification_types.h"
|
| @@ -72,6 +74,10 @@ void WebAuthFlow::Start() {
|
| this,
|
| content::NOTIFICATION_RESOURCE_RECEIVED_REDIRECT,
|
| content::Source<WebContents>(contents_));
|
| + registrar_.Add(
|
| + this,
|
| + content::NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED,
|
| + content::Source<WebContents>(contents_));
|
|
|
| controller->LoadURL(
|
| provider_url_,
|
| @@ -129,6 +135,15 @@ void WebAuthFlow::Observe(int type,
|
| BeforeUrlLoaded(redirect_details->new_url);
|
| }
|
| break;
|
| + case content::NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED: {
|
| + std::pair<content::NavigationEntry*, bool>* title =
|
| + content::Details<
|
| + std::pair<content::NavigationEntry*, bool> >(details).ptr();
|
| +
|
| + if (title->first)
|
| + delegate_->OnAuthFlowTitleChange(UTF16ToUTF8(title->first->GetTitle()));
|
| + }
|
| + break;
|
| default:
|
| NOTREACHED() << "Got a notification that we did not register for: "
|
| << type;
|
|
|