| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/ref_counted_memory.h" | 5 #include "base/ref_counted_memory.h" |
| 6 #include "base/singleton.h" | 6 #include "base/singleton.h" |
| 7 #include "base/string_piece.h" | 7 #include "base/string_piece.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/browser_thread.h" | 9 #include "chrome/browser/browser_thread.h" |
| 10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 11 #include "chrome/browser/chromeos/cros/power_library.h" | 11 #include "chrome/browser/chromeos/cros/power_library.h" |
| 12 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade.h" | 12 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade.h" |
| 13 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_cros.h" | 13 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_cros.h" |
| 14 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_cros.h" | 14 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_cros.h" |
| 15 #include "chrome/browser/chromeos/dom_ui/login/login_ui.h" | 15 #include "chrome/browser/chromeos/dom_ui/login/login_ui.h" |
| 16 #include "chrome/browser/chromeos/dom_ui/login/login_ui_helpers.h" | 16 #include "chrome/browser/chromeos/dom_ui/login/login_ui_helpers.h" |
| 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/tab_contents/tab_contents.h" |
| 17 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| 18 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
| 19 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
| 20 | 22 |
| 21 namespace chromeos { | 23 namespace chromeos { |
| 22 | 24 |
| 23 //////////////////////////////////////////////////////////////////////////////// | 25 //////////////////////////////////////////////////////////////////////////////// |
| 24 // | 26 // |
| 25 // LoginUIHTMLSource | 27 // LoginUIHTMLSource |
| 26 // | 28 // |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // LoginUI | 150 // LoginUI |
| 149 // | 151 // |
| 150 //////////////////////////////////////////////////////////////////////////////// | 152 //////////////////////////////////////////////////////////////////////////////// |
| 151 LoginUI::LoginUI(TabContents* contents) | 153 LoginUI::LoginUI(TabContents* contents) |
| 152 : DOMUI(contents) { | 154 : DOMUI(contents) { |
| 153 LoginUIHandler* handler = new LoginUIHandler(); | 155 LoginUIHandler* handler = new LoginUIHandler(); |
| 154 AddMessageHandler(handler->Attach(this)); | 156 AddMessageHandler(handler->Attach(this)); |
| 155 LoginUIHTMLSource* html_source = | 157 LoginUIHTMLSource* html_source = |
| 156 new LoginUIHTMLSource(MessageLoop::current()); | 158 new LoginUIHTMLSource(MessageLoop::current()); |
| 157 | 159 |
| 158 BrowserThread::PostTask( | 160 contents->profile->GetChromeURLDataManager()->AddDataSource(html_source); |
| 159 BrowserThread::IO, FROM_HERE, | |
| 160 NewRunnableMethod( | |
| 161 ChromeURLDataManager::GetInstance(), | |
| 162 &ChromeURLDataManager::AddDataSource, | |
| 163 make_scoped_refptr(html_source))); | |
| 164 } | 161 } |
| 165 | 162 |
| 166 } // namespace chromeos | 163 } // namespace chromeos |
| OLD | NEW |