| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/login/registration_screen.h" | 5 #include "chrome/browser/chromeos/login/registration_screen.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 11 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 11 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 14 #include "content/browser/child_process_security_policy.h" | 14 #include "content/browser/child_process_security_policy.h" |
| 15 #include "content/browser/renderer_host/render_view_host.h" | 15 #include "content/browser/renderer_host/render_view_host.h" |
| 16 #include "content/browser/site_instance.h" | 16 #include "content/public/browser/site_instance.h" |
| 17 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 19 #include "net/url_request/url_request_about_job.h" | 19 #include "net/url_request/url_request_about_job.h" |
| 20 #include "net/url_request/url_request_filter.h" | 20 #include "net/url_request/url_request_filter.h" |
| 21 | 21 |
| 22 using content::OpenURLParams; | 22 using content::OpenURLParams; |
| 23 using content::WebContents; | 23 using content::WebContents; |
| 24 | 24 |
| 25 namespace chromeos { | 25 namespace chromeos { |
| 26 | 26 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // RegistrationScreen, ViewScreen implementation: | 63 // RegistrationScreen, ViewScreen implementation: |
| 64 void RegistrationScreen::CreateView() { | 64 void RegistrationScreen::CreateView() { |
| 65 ViewScreen<RegistrationView>::CreateView(); | 65 ViewScreen<RegistrationView>::CreateView(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void RegistrationScreen::Refresh() { | 68 void RegistrationScreen::Refresh() { |
| 69 StartTimeoutTimer(); | 69 StartTimeoutTimer(); |
| 70 GURL url(kRegistrationHostPageUrl); | 70 GURL url(kRegistrationHostPageUrl); |
| 71 Profile* profile = ProfileManager::GetDefaultProfile(); | 71 Profile* profile = ProfileManager::GetDefaultProfile(); |
| 72 view()->InitDOM(profile, | 72 view()->InitDOM(profile, |
| 73 SiteInstance::CreateSiteInstanceForURL(profile, url)); | 73 content::SiteInstance::CreateSiteInstanceForURL(profile, |
| 74 url)); |
| 74 view()->SetWebContentsDelegate(this); | 75 view()->SetWebContentsDelegate(this); |
| 75 view()->LoadURL(url); | 76 view()->LoadURL(url); |
| 76 } | 77 } |
| 77 | 78 |
| 78 RegistrationView* RegistrationScreen::AllocateView() { | 79 RegistrationView* RegistrationScreen::AllocateView() { |
| 79 return new RegistrationView(); | 80 return new RegistrationView(); |
| 80 } | 81 } |
| 81 | 82 |
| 82 /////////////////////////////////////////////////////////////////////////////// | 83 /////////////////////////////////////////////////////////////////////////////// |
| 83 // RegistrationScreen, content::WebContentsDelegate implementation: | 84 // RegistrationScreen, content::WebContentsDelegate implementation: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } | 124 } |
| 124 | 125 |
| 125 // static | 126 // static |
| 126 net::URLRequestJob* RegistrationScreen::Factory(net::URLRequest* request, | 127 net::URLRequestJob* RegistrationScreen::Factory(net::URLRequest* request, |
| 127 const std::string& scheme) { | 128 const std::string& scheme) { |
| 128 VLOG(1) << "Handling url: " << request->url().spec().c_str(); | 129 VLOG(1) << "Handling url: " << request->url().spec().c_str(); |
| 129 return new net::URLRequestAboutJob(request); | 130 return new net::URLRequestAboutJob(request); |
| 130 } | 131 } |
| 131 | 132 |
| 132 } // namespace chromeos | 133 } // namespace chromeos |
| OLD | NEW |