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

Side by Side Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/audio/sounds.h" 10 #include "ash/audio/sounds.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 pointer_factory_(this), 274 pointer_factory_(this),
275 animation_weak_ptr_factory_(this) { 275 animation_weak_ptr_factory_(this) {
276 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this); 276 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
277 CrasAudioHandler::Get()->AddAudioObserver(this); 277 CrasAudioHandler::Get()->AddAudioObserver(this);
278 if (keyboard::KeyboardController::GetInstance()) { 278 if (keyboard::KeyboardController::GetInstance()) {
279 keyboard::KeyboardController::GetInstance()->AddObserver(this); 279 keyboard::KeyboardController::GetInstance()->AddObserver(this);
280 is_observing_keyboard_ = true; 280 is_observing_keyboard_ = true;
281 } 281 }
282 282
283 ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this); 283 ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this);
284 ash::Shell::GetScreen()->AddObserver(this); 284 gfx::Screen::GetScreen()->AddObserver(this);
285 285
286 // We need to listen to CLOSE_ALL_BROWSERS_REQUEST but not APP_TERMINATING 286 // We need to listen to CLOSE_ALL_BROWSERS_REQUEST but not APP_TERMINATING
287 // because/ APP_TERMINATING will never be fired as long as this keeps 287 // because/ APP_TERMINATING will never be fired as long as this keeps
288 // ref-count. CLOSE_ALL_BROWSERS_REQUEST is safe here because there will be no 288 // ref-count. CLOSE_ALL_BROWSERS_REQUEST is safe here because there will be no
289 // browser instance that will block the shutdown. 289 // browser instance that will block the shutdown.
290 registrar_.Add(this, 290 registrar_.Add(this,
291 chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, 291 chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
292 content::NotificationService::AllSources()); 292 content::NotificationService::AllSources());
293 293
294 // NOTIFICATION_BROWSER_OPENED is issued after browser is created, but 294 // NOTIFICATION_BROWSER_OPENED is issued after browser is created, but
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 LoginDisplayHostImpl::~LoginDisplayHostImpl() { 379 LoginDisplayHostImpl::~LoginDisplayHostImpl() {
380 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); 380 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
381 CrasAudioHandler::Get()->RemoveAudioObserver(this); 381 CrasAudioHandler::Get()->RemoveAudioObserver(this);
382 if (keyboard::KeyboardController::GetInstance() && is_observing_keyboard_) { 382 if (keyboard::KeyboardController::GetInstance() && is_observing_keyboard_) {
383 keyboard::KeyboardController::GetInstance()->RemoveObserver(this); 383 keyboard::KeyboardController::GetInstance()->RemoveObserver(this);
384 is_observing_keyboard_ = false; 384 is_observing_keyboard_ = false;
385 } 385 }
386 386
387 ash::Shell::GetInstance()->delegate()-> 387 ash::Shell::GetInstance()->delegate()->
388 RemoveVirtualKeyboardStateObserver(this); 388 RemoveVirtualKeyboardStateObserver(this);
389 ash::Shell::GetScreen()->RemoveObserver(this); 389 gfx::Screen::GetScreen()->RemoveObserver(this);
390 390
391 if (login_view_ && login_window_) 391 if (login_view_ && login_window_)
392 login_window_->RemoveRemovalsObserver(this); 392 login_window_->RemoveRemovalsObserver(this);
393 393
394 ResetKeyboardOverscrollOverride(); 394 ResetKeyboardOverscrollOverride();
395 395
396 views::FocusManager::set_arrow_key_traversal_enabled(false); 396 views::FocusManager::set_arrow_key_traversal_enabled(false);
397 ResetLoginWindowAndView(); 397 ResetLoginWindowAndView();
398 398
399 // Let chrome process exit after login/oobe screen if needed. 399 // Let chrome process exit after login/oobe screen if needed.
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 1263
1264 locale_util::SwitchLanguageCallback callback( 1264 locale_util::SwitchLanguageCallback callback(
1265 base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data)))); 1265 base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data))));
1266 1266
1267 // Load locale keyboards here. Hardware layout would be automatically enabled. 1267 // Load locale keyboards here. Hardware layout would be automatically enabled.
1268 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */, 1268 locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */,
1269 callback, ProfileManager::GetActiveUserProfile()); 1269 callback, ProfileManager::GetActiveUserProfile());
1270 } 1270 }
1271 1271
1272 } // namespace chromeos 1272 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock/webui_screen_locker.cc ('k') | chrome/browser/chromeos/net/network_portal_web_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698