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/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" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 void RegistrationScreen::OnPageLoadFailed(const std::string& url) { | 103 void RegistrationScreen::OnPageLoadFailed(const std::string& url) { |
104 LOG(ERROR) << "Error loading registration page: " << url; | 104 LOG(ERROR) << "Error loading registration page: " << url; |
105 CloseScreen(ScreenObserver::REGISTRATION_SKIPPED); | 105 CloseScreen(ScreenObserver::REGISTRATION_SKIPPED); |
106 } | 106 } |
107 | 107 |
108 /////////////////////////////////////////////////////////////////////////////// | 108 /////////////////////////////////////////////////////////////////////////////// |
109 // RegistrationScreen, TabContentsDelegate implementation: | 109 // RegistrationScreen, TabContentsDelegate implementation: |
110 | 110 |
111 // TODO(adriansc): Remove this method once refactoring changed all call sites. | |
112 TabContents* RegistrationScreen::OpenURLFromTab( | |
113 TabContents* source, | |
114 const GURL& url, | |
115 const GURL& referrer, | |
116 WindowOpenDisposition disposition, | |
117 content::PageTransition transition) { | |
118 return OpenURLFromTab(source, | |
119 OpenURLParams(url, referrer, disposition, transition, | |
120 false)); | |
121 } | |
122 | |
123 TabContents* RegistrationScreen::OpenURLFromTab(TabContents* source, | 111 TabContents* RegistrationScreen::OpenURLFromTab(TabContents* source, |
124 const OpenURLParams& params) { | 112 const OpenURLParams& params) { |
125 if (params.url.spec() == kRegistrationSuccessUrl) { | 113 if (params.url.spec() == kRegistrationSuccessUrl) { |
126 source->Stop(); | 114 source->Stop(); |
127 VLOG(1) << "Registration form completed."; | 115 VLOG(1) << "Registration form completed."; |
128 CloseScreen(ScreenObserver::REGISTRATION_SUCCESS); | 116 CloseScreen(ScreenObserver::REGISTRATION_SUCCESS); |
129 } else if (params.url.spec() == kRegistrationSkippedUrl) { | 117 } else if (params.url.spec() == kRegistrationSkippedUrl) { |
130 source->Stop(); | 118 source->Stop(); |
131 VLOG(1) << "Registration form skipped."; | 119 VLOG(1) << "Registration form skipped."; |
132 CloseScreen(ScreenObserver::REGISTRATION_SKIPPED); | 120 CloseScreen(ScreenObserver::REGISTRATION_SKIPPED); |
(...skipping 27 matching lines...) Expand all Loading... |
160 } | 148 } |
161 | 149 |
162 // static | 150 // static |
163 net::URLRequestJob* RegistrationScreen::Factory(net::URLRequest* request, | 151 net::URLRequestJob* RegistrationScreen::Factory(net::URLRequest* request, |
164 const std::string& scheme) { | 152 const std::string& scheme) { |
165 VLOG(1) << "Handling url: " << request->url().spec().c_str(); | 153 VLOG(1) << "Handling url: " << request->url().spec().c_str(); |
166 return new net::URLRequestAboutJob(request); | 154 return new net::URLRequestAboutJob(request); |
167 } | 155 } |
168 | 156 |
169 } // namespace chromeos | 157 } // namespace chromeos |
OLD | NEW |