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

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

Issue 12438016: Save display preference when all display configuration changes has been completed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: replace dcheck Created 7 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_DISPLAY_PRIMARY_DISPLAY_SWITCH_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_PRIMARY_DISPLAY_SWITCH_OBSERVER_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ui/aura/root_window_observer.h"
11 #include "ui/aura/window_observer.h"
12
13 namespace aura {
14 class RootWindow;
15 }
16
17 namespace gfx {
18 class Point;
19 }
20
21 namespace chromeos {
22
23 // PrimaryDisplaySwitchObserver observes the change of the primary/secondary
24 // displays and store the current primary display ID into the local preference.
25 class PrimaryDisplaySwitchObserver : public aura::RootWindowObserver,
26 public aura::WindowObserver {
27 public:
28 PrimaryDisplaySwitchObserver();
29 virtual ~PrimaryDisplaySwitchObserver();
30
31 protected:
32 // aura::RootWindowObserver overrides:
33 virtual void OnRootWindowMoved(const aura::RootWindow* root_window,
34 const gfx::Point& new_origin) OVERRIDE;
35 // aura::WindowObserver overrides:
36 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
37
38 aura::RootWindow* primary_root_;
39
40 DISALLOW_COPY_AND_ASSIGN(PrimaryDisplaySwitchObserver);
41 };
42
43 } // namespace chromeos
44
45 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_PRIMARY_DISPLAY_SWITCH_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698