| 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/dom_ui/login/authenticator_facade.h" | 10 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade.h" |
| 11 #include "chrome/browser/chromeos/dom_ui/login/login_ui.h" | 11 #include "chrome/browser/chromeos/dom_ui/login/login_ui.h" |
| 12 #include "chrome/browser/chromeos/dom_ui/login/login_ui_helpers.h" | 12 #include "chrome/browser/chromeos/dom_ui/login/login_ui_helpers.h" |
| 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/tab_contents/tab_contents.h" |
| 13 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/browser_window.h" | 16 #include "chrome/browser/ui/browser_window.h" |
| 15 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
| 16 | 18 |
| 17 #if defined(OS_CHROMEOS) | 19 #if defined(OS_CHROMEOS) |
| 18 #include "chrome/browser/chromeos/cros/cros_library.h" | 20 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 19 #include "chrome/browser/chromeos/cros/power_library.h" | 21 #include "chrome/browser/chromeos/cros/power_library.h" |
| 20 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_cros.h" | 22 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_cros.h" |
| 21 #else | 23 #else |
| 22 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_stub.h" | 24 #include "chrome/browser/chromeos/dom_ui/login/authenticator_facade_stub.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // LoginUI | 163 // LoginUI |
| 162 // | 164 // |
| 163 //////////////////////////////////////////////////////////////////////////////// | 165 //////////////////////////////////////////////////////////////////////////////// |
| 164 LoginUI::LoginUI(TabContents* contents) | 166 LoginUI::LoginUI(TabContents* contents) |
| 165 : DOMUI(contents) { | 167 : DOMUI(contents) { |
| 166 LoginUIHandler* handler = new LoginUIHandler(); | 168 LoginUIHandler* handler = new LoginUIHandler(); |
| 167 AddMessageHandler(handler->Attach(this)); | 169 AddMessageHandler(handler->Attach(this)); |
| 168 LoginUIHTMLSource* html_source = | 170 LoginUIHTMLSource* html_source = |
| 169 new LoginUIHTMLSource(MessageLoop::current()); | 171 new LoginUIHTMLSource(MessageLoop::current()); |
| 170 | 172 |
| 171 BrowserThread::PostTask( | 173 contents->profile->GetChromeURLDataManager()->AddDataSource(html_source); |
| 172 BrowserThread::IO, FROM_HERE, | |
| 173 NewRunnableMethod( | |
| 174 ChromeURLDataManager::GetInstance(), | |
| 175 &ChromeURLDataManager::AddDataSource, | |
| 176 make_scoped_refptr(html_source))); | |
| 177 } | 174 } |
| 178 | 175 |
| 179 } // namespace chromeos | 176 } // namespace chromeos |
| OLD | NEW |