| OLD | NEW |
| 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/webui/signin/inline_login_ui.h" | 5 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 7 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "content/public/browser/web_ui.h" | 10 #include "content/public/browser/web_ui.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 InlineLoginUI::InlineLoginUI(content::WebUI* web_ui) | 40 InlineLoginUI::InlineLoginUI(content::WebUI* web_ui) |
| 41 : WebDialogUI(web_ui), | 41 : WebDialogUI(web_ui), |
| 42 auth_extension_(Profile::FromWebUI(web_ui)) { | 42 auth_extension_(Profile::FromWebUI(web_ui)) { |
| 43 Profile* profile = Profile::FromWebUI(web_ui); | 43 Profile* profile = Profile::FromWebUI(web_ui); |
| 44 content::WebUIDataSource::Add(profile, CreateWebUIDataSource()); | 44 content::WebUIDataSource::Add(profile, CreateWebUIDataSource()); |
| 45 | 45 |
| 46 #if defined(OS_CHROMEOS) | 46 #if defined(OS_CHROMEOS) |
| 47 web_ui->AddMessageHandler(new chromeos::InlineLoginHandlerChromeOS()); | 47 web_ui->AddMessageHandler(new chromeos::InlineLoginHandlerChromeOS()); |
| 48 #else | 48 #else |
| 49 web_ui->AddMessageHandler(new InlineLoginHandlerImpl()); | 49 web_ui->AddMessageHandler(new InlineLoginHandlerImpl()); |
| 50 #endif |
| 50 // Required for intercepting extension function calls when the page is loaded | 51 // Required for intercepting extension function calls when the page is loaded |
| 51 // in a bubble (not a full tab, thus tab helpers are not registered | 52 // in a bubble (not a full tab, thus tab helpers are not registered |
| 52 // automatically). | 53 // automatically). |
| 53 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( | 54 extensions::ChromeExtensionWebContentsObserver::CreateForWebContents( |
| 54 web_ui->GetWebContents()); | 55 web_ui->GetWebContents()); |
| 55 #endif | |
| 56 } | 56 } |
| 57 | 57 |
| 58 InlineLoginUI::~InlineLoginUI() {} | 58 InlineLoginUI::~InlineLoginUI() {} |
| OLD | NEW |