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

Side by Side Diff: ash/display/screen_ash.h

Issue 2207043002: SetDeviceScaleFactorForTest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetDeviceScaleFactorForTest Created 4 years, 4 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
« no previous file with comments | « no previous file | ash/display/screen_ash.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ASH_DISPLAY_SCREEN_ASH_H_ 5 #ifndef ASH_DISPLAY_SCREEN_ASH_H_
6 #define ASH_DISPLAY_SCREEN_ASH_H_ 6 #define ASH_DISPLAY_SCREEN_ASH_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 12 matching lines...) Expand all
23 class DisplayManager; 23 class DisplayManager;
24 } 24 }
25 25
26 // Aura implementation of display::Screen. Implemented here to avoid circular 26 // Aura implementation of display::Screen. Implemented here to avoid circular
27 // dependencies. 27 // dependencies.
28 class ASH_EXPORT ScreenAsh : public display::Screen { 28 class ASH_EXPORT ScreenAsh : public display::Screen {
29 public: 29 public:
30 ScreenAsh(); 30 ScreenAsh();
31 ~ScreenAsh() override; 31 ~ScreenAsh() override;
32 32
33 // display::Screen overrides: 33 // display::Screen:
34 gfx::Point GetCursorScreenPoint() override; 34 gfx::Point GetCursorScreenPoint() override;
35 bool IsWindowUnderCursor(gfx::NativeWindow window) override; 35 bool IsWindowUnderCursor(gfx::NativeWindow window) override;
36 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; 36 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
37 int GetNumDisplays() const override; 37 int GetNumDisplays() const override;
38 std::vector<display::Display> GetAllDisplays() const override; 38 std::vector<display::Display> GetAllDisplays() const override;
39 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override; 39 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
40 display::Display GetDisplayNearestPoint( 40 display::Display GetDisplayNearestPoint(
41 const gfx::Point& point) const override; 41 const gfx::Point& point) const override;
42 display::Display GetDisplayMatching( 42 display::Display GetDisplayMatching(
43 const gfx::Rect& match_rect) const override; 43 const gfx::Rect& match_rect) const override;
44 display::Display GetPrimaryDisplay() const override; 44 display::Display GetPrimaryDisplay() const override;
45 void AddObserver(display::DisplayObserver* observer) override; 45 void AddObserver(display::DisplayObserver* observer) override;
46 void RemoveObserver(display::DisplayObserver* observer) override; 46 void RemoveObserver(display::DisplayObserver* observer) override;
47 void SetDeviceScaleFactorForTest(float scale_factor) override;
47 48
48 private: 49 private:
49 friend class DisplayManager; 50 friend class DisplayManager;
50 51
51 // Notifies observers of display configuration changes. 52 // Notifies observers of display configuration changes.
52 void NotifyMetricsChanged(const display::Display& display, uint32_t metrics); 53 void NotifyMetricsChanged(const display::Display& display, uint32_t metrics);
53 void NotifyDisplayAdded(const display::Display& display); 54 void NotifyDisplayAdded(const display::Display& display);
54 void NotifyDisplayRemoved(const display::Display& display); 55 void NotifyDisplayRemoved(const display::Display& display);
55 56
56 // Creates a screen that can be used during shutdown. 57 // Creates a screen that can be used during shutdown.
57 // It simply has a copy of the displays. 58 // It simply has a copy of the displays.
58 display::Screen* CloneForShutdown(); 59 display::Screen* CloneForShutdown();
59 60
60 base::ObserverList<display::DisplayObserver> observers_; 61 base::ObserverList<display::DisplayObserver> observers_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); 63 DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
63 }; 64 };
64 65
65 } // namespace ash 66 } // namespace ash
66 67
67 #endif // ASH_DISPLAY_SCREEN_ASH_H_ 68 #endif // ASH_DISPLAY_SCREEN_ASH_H_
OLDNEW
« no previous file with comments | « no previous file | ash/display/screen_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698