Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: chrome/browser/chromeos/login/webui_login_view.cc

Issue 10779042: Move notifications only used in chrome/ to chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix oops Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/webui_login_view.h" 5 #include "chrome/browser/chromeos/login/webui_login_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 NULL); 153 NULL);
154 tab_contents_.reset(new TabContents(web_contents)); 154 tab_contents_.reset(new TabContents(web_contents));
155 webui_login_->SetWebContents(web_contents); 155 webui_login_->SetWebContents(web_contents);
156 156
157 web_contents->SetDelegate(this); 157 web_contents->SetDelegate(this);
158 renderer_preferences_util::UpdateFromSystemSettings( 158 renderer_preferences_util::UpdateFromSystemSettings(
159 web_contents->GetMutableRendererPrefs(), 159 web_contents->GetMutableRendererPrefs(),
160 ProfileManager::GetDefaultProfile()); 160 ProfileManager::GetDefaultProfile());
161 161
162 registrar_.Add(this, 162 registrar_.Add(this,
163 content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB, 163 content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED,
164 content::Source<WebContents>(web_contents)); 164 content::Source<WebContents>(web_contents));
165 } 165 }
166 166
167 std::string WebUILoginView::GetClassName() const { 167 std::string WebUILoginView::GetClassName() const {
168 return kViewClassName; 168 return kViewClassName;
169 } 169 }
170 170
171 bool WebUILoginView::AcceleratorPressed( 171 bool WebUILoginView::AcceleratorPressed(
172 const ui::Accelerator& accelerator) { 172 const ui::Accelerator& accelerator) {
173 AccelMap::const_iterator entry = accel_map_.find(accelerator); 173 AccelMap::const_iterator entry = accel_map_.find(accelerator);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 void WebUILoginView::Observe(int type, 266 void WebUILoginView::Observe(int type,
267 const content::NotificationSource& source, 267 const content::NotificationSource& source,
268 const content::NotificationDetails& details) { 268 const content::NotificationDetails& details) {
269 switch (type) { 269 switch (type) {
270 case chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE: { 270 case chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE: {
271 OnLoginPromptVisible(); 271 OnLoginPromptVisible();
272 registrar_.RemoveAll(); 272 registrar_.RemoveAll();
273 break; 273 break;
274 } 274 }
275 case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: { 275 case content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED: {
276 RenderViewHost* render_view_host = 276 RenderViewHost* render_view_host =
277 content::Details<RenderViewHost>(details).ptr(); 277 content::Details<RenderViewHost>(details).ptr();
278 new SnifferObserver(render_view_host, GetWebUI()); 278 new SnifferObserver(render_view_host, GetWebUI());
279 break; 279 break;
280 } 280 }
281 default: 281 default:
282 NOTREACHED() << "Unexpected notification " << type; 282 NOTREACHED() << "Unexpected notification " << type;
283 } 283 }
284 } 284 }
285 285
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 oobe_ui->OnLoginPromptVisible(); 350 oobe_ui->OnLoginPromptVisible();
351 } 351 }
352 352
353 void WebUILoginView::ReturnFocus(bool reverse) { 353 void WebUILoginView::ReturnFocus(bool reverse) {
354 // Return the focus to the web contents. 354 // Return the focus to the web contents.
355 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); 355 webui_login_->web_contents()->FocusThroughTabTraversal(reverse);
356 GetWidget()->Activate(); 356 GetWidget()->Activate();
357 } 357 }
358 358
359 } // namespace chromeos 359 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698