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

Side by Side Diff: chrome/browser/chromeos/display/primary_display_switch_observer.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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/display/primary_display_switch_observer.h" 5 #include "chrome/browser/chromeos/display/primary_display_switch_observer.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "chrome/browser/chromeos/display/display_preferences.h" 8 #include "chrome/browser/chromeos/display/display_preferences.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
11 #include "ui/aura/root_window.h" 11 #include "ui/aura/root_window.h"
12 #include "ui/gfx/display.h" 12 #include "ui/gfx/display.h"
13 #include "ui/gfx/screen.h" 13 #include "ui/gfx/screen.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 void PrimaryDisplaySwitchObserver::OnRootWindowMoved( 17 void PrimaryDisplaySwitchObserver::OnRootWindowMoved(
18 const aura::RootWindow* root_window, const gfx::Point& new_origin) { 18 const aura::RootWindow* root_window, const gfx::Point& new_origin) {
19 StorePrimaryDisplayIDPref(gfx::Screen::GetPrimaryDisplay().id()); 19 StorePrimaryDisplayIDPref(ash::Shell::GetScreen()->GetPrimaryDisplay().id());
20 } 20 }
21 21
22 PrimaryDisplaySwitchObserver::PrimaryDisplaySwitchObserver() 22 PrimaryDisplaySwitchObserver::PrimaryDisplaySwitchObserver()
23 : primary_root_(ash::Shell::GetInstance()->GetPrimaryRootWindow()) { 23 : primary_root_(ash::Shell::GetInstance()->GetPrimaryRootWindow()) {
24 primary_root_->AddRootWindowObserver(this); 24 primary_root_->AddRootWindowObserver(this);
25 } 25 }
26 26
27 PrimaryDisplaySwitchObserver::~PrimaryDisplaySwitchObserver() { 27 PrimaryDisplaySwitchObserver::~PrimaryDisplaySwitchObserver() {
28 primary_root_->RemoveRootWindowObserver(this); 28 primary_root_->RemoveRootWindowObserver(this);
29 } 29 }
30 30
31 } // namespace chromeos 31 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer_unittest.cc ('k') | chrome/browser/chromeos/extensions/file_manager_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698