OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/login/login_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/login_ui.h" |
6 | 6 |
7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/chromeos/cros/cros_library.h" | 11 #include "chrome/browser/chromeos/cros/cros_library.h" |
12 #include "chrome/browser/chromeos/cros/power_library.h" | 12 #include "chrome/browser/chromeos/cros/power_library.h" |
13 #include "chrome/browser/chromeos/login/dom_login_display.h" | 13 #include "chrome/browser/chromeos/login/webui_login_display.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_window.h" | 16 #include "chrome/browser/ui/browser_window.h" |
17 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 17 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
18 #include "chrome/browser/ui/webui/chromeos/login/login_ui_helpers.h" | 18 #include "chrome/browser/ui/webui/chromeos/login/login_ui_helpers.h" |
19 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
20 #include "content/browser/browser_thread.h" | 20 #include "content/browser/browser_thread.h" |
21 #include "content/browser/tab_contents/tab_contents.h" | 21 #include "content/browser/tab_contents/tab_contents.h" |
22 | 22 |
23 namespace { | 23 namespace { |
(...skipping 28 matching lines...) Expand all Loading... |
52 return "text/html"; | 52 return "text/html"; |
53 } | 53 } |
54 | 54 |
55 // LoginUIHandlerDelegate, protected: ------------------------------------------ | 55 // LoginUIHandlerDelegate, protected: ------------------------------------------ |
56 | 56 |
57 LoginUIHandlerDelegate::~LoginUIHandlerDelegate() {} | 57 LoginUIHandlerDelegate::~LoginUIHandlerDelegate() {} |
58 | 58 |
59 // LoginUIHandler, public: ----------------------------------------------------- | 59 // LoginUIHandler, public: ----------------------------------------------------- |
60 | 60 |
61 LoginUIHandler::LoginUIHandler() { | 61 LoginUIHandler::LoginUIHandler() { |
62 delegate_ = DOMLoginDisplay::GetInstance(); | 62 delegate_ = WebUILoginDisplay::GetInstance(); |
63 delegate_->set_login_handler(this); | 63 delegate_->set_login_handler(this); |
64 } | 64 } |
65 | 65 |
66 WebUIMessageHandler* LoginUIHandler::Attach(WebUI* web_ui) { | 66 WebUIMessageHandler* LoginUIHandler::Attach(WebUI* web_ui) { |
67 return WebUIMessageHandler::Attach(web_ui); | 67 return WebUIMessageHandler::Attach(web_ui); |
68 } | 68 } |
69 | 69 |
70 void LoginUIHandler::RegisterMessages() { | 70 void LoginUIHandler::RegisterMessages() { |
71 web_ui_->RegisterMessageCallback( | 71 web_ui_->RegisterMessageCallback( |
72 "LaunchIncognito", | 72 "LaunchIncognito", |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 : WebUI(contents) { | 112 : WebUI(contents) { |
113 LoginUIHandler* handler = new LoginUIHandler(); | 113 LoginUIHandler* handler = new LoginUIHandler(); |
114 AddMessageHandler(handler->Attach(this)); | 114 AddMessageHandler(handler->Attach(this)); |
115 LoginUIHTMLSource* html_source = | 115 LoginUIHTMLSource* html_source = |
116 new LoginUIHTMLSource(MessageLoop::current()); | 116 new LoginUIHTMLSource(MessageLoop::current()); |
117 | 117 |
118 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 118 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
119 } | 119 } |
120 | 120 |
121 } // namespace chromeos | 121 } // namespace chromeos |
OLD | NEW |