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

Side by Side Diff: ui/mojo/init/screen_mojo.h

Issue 1407073002: Adds GetDisplays() to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 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
« no previous file with comments | « mojo/converters/network/network_type_converters.cc ('k') | ui/mojo/init/screen_mojo.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_MOJO_INIT_SCREEN_MOJO_H_ 5 #ifndef UI_MOJO_INIT_SCREEN_MOJO_H_
6 #define UI_MOJO_INIT_SCREEN_MOJO_H_ 6 #define UI_MOJO_INIT_SCREEN_MOJO_H_
7 7
8 #include <vector>
9
8 #include "ui/gfx/display.h" 10 #include "ui/gfx/display.h"
9 #include "ui/gfx/geometry/size.h"
10 #include "ui/gfx/screen.h" 11 #include "ui/gfx/screen.h"
11 12
12 namespace ui { 13 namespace ui {
13 namespace mojo { 14 namespace mojo {
14 15
15 class ScreenMojo : public gfx::Screen { 16 class ScreenMojo : public gfx::Screen {
16 public: 17 public:
17 ScreenMojo(const gfx::Size& screen_size_in_pixels, float device_pixel_ratio); 18 explicit ScreenMojo(const std::vector<gfx::Display>& displays);
19 ~ScreenMojo() override;
18 20
19 // gfx::Screen: 21 // gfx::Screen:
20 gfx::Point GetCursorScreenPoint() override; 22 gfx::Point GetCursorScreenPoint() override;
21 gfx::NativeWindow GetWindowUnderCursor() override; 23 gfx::NativeWindow GetWindowUnderCursor() override;
22 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; 24 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
23 gfx::Display GetPrimaryDisplay() const override; 25 gfx::Display GetPrimaryDisplay() const override;
24 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override; 26 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
25 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override; 27 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
26 int GetNumDisplays() const override; 28 int GetNumDisplays() const override;
27 std::vector<gfx::Display> GetAllDisplays() const override; 29 std::vector<gfx::Display> GetAllDisplays() const override;
28 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override; 30 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
29 void AddObserver(gfx::DisplayObserver* observer) override; 31 void AddObserver(gfx::DisplayObserver* observer) override;
30 void RemoveObserver(gfx::DisplayObserver* observer) override; 32 void RemoveObserver(gfx::DisplayObserver* observer) override;
31 33
32 private: 34 private:
33 const gfx::Size screen_size_in_pixels_; 35 const std::vector<gfx::Display> displays_;
34 const float device_pixel_ratio_;
35
36 gfx::Display display_;
37 36
38 DISALLOW_COPY_AND_ASSIGN(ScreenMojo); 37 DISALLOW_COPY_AND_ASSIGN(ScreenMojo);
39 }; 38 };
40 39
41 } // namespace mojo 40 } // namespace mojo
42 } // namespace ui 41 } // namespace ui
43 42
44 #endif // UI_MOJO_INIT_SCREEN_MOJO_H_ 43 #endif // UI_MOJO_INIT_SCREEN_MOJO_H_
OLDNEW
« no previous file with comments | « mojo/converters/network/network_type_converters.cc ('k') | ui/mojo/init/screen_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698