| 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" | |
| 19 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
| 20 #include "chrome/browser/ui/browser_window.h" | 18 #include "chrome/browser/ui/browser_window.h" |
| 21 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
| 22 | 20 |
| 23 namespace chromeos { | 21 namespace chromeos { |
| 24 | 22 |
| 25 //////////////////////////////////////////////////////////////////////////////// | 23 //////////////////////////////////////////////////////////////////////////////// |
| 26 // | 24 // |
| 27 // LoginUIHTMLSource | 25 // LoginUIHTMLSource |
| 28 // | 26 // |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // LoginUI | 148 // LoginUI |
| 151 // | 149 // |
| 152 //////////////////////////////////////////////////////////////////////////////// | 150 //////////////////////////////////////////////////////////////////////////////// |
| 153 LoginUI::LoginUI(TabContents* contents) | 151 LoginUI::LoginUI(TabContents* contents) |
| 154 : DOMUI(contents) { | 152 : DOMUI(contents) { |
| 155 LoginUIHandler* handler = new LoginUIHandler(); | 153 LoginUIHandler* handler = new LoginUIHandler(); |
| 156 AddMessageHandler(handler->Attach(this)); | 154 AddMessageHandler(handler->Attach(this)); |
| 157 LoginUIHTMLSource* html_source = | 155 LoginUIHTMLSource* html_source = |
| 158 new LoginUIHTMLSource(MessageLoop::current()); | 156 new LoginUIHTMLSource(MessageLoop::current()); |
| 159 | 157 |
| 160 contents->profile->GetChromeURLDataManager()->AddDataSource(html_source); | 158 BrowserThread::PostTask( |
| 159 BrowserThread::IO, FROM_HERE, |
| 160 NewRunnableMethod( |
| 161 ChromeURLDataManager::GetInstance(), |
| 162 &ChromeURLDataManager::AddDataSource, |
| 163 make_scoped_refptr(html_source))); |
| 161 } | 164 } |
| 162 | 165 |
| 163 } // namespace chromeos | 166 } // namespace chromeos |
| OLD | NEW |