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

Side by Side Diff: headless/lib/browser/headless_screen.h

Issue 2361283002: Add GetDisplayWithDisplayId to display::Screen. (Closed)
Patch Set: ref, test, etc Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_
6 #define HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ 6 #define HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/aura/window_observer.h" 10 #include "ui/aura/window_observer.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const gfx::Rect& old_bounds, 47 const gfx::Rect& old_bounds,
48 const gfx::Rect& new_bounds) override; 48 const gfx::Rect& new_bounds) override;
49 void OnWindowDestroying(aura::Window* window) override; 49 void OnWindowDestroying(aura::Window* window) override;
50 50
51 // display::Screen overrides: 51 // display::Screen overrides:
52 gfx::Point GetCursorScreenPoint() override; 52 gfx::Point GetCursorScreenPoint() override;
53 bool IsWindowUnderCursor(gfx::NativeWindow window) override; 53 bool IsWindowUnderCursor(gfx::NativeWindow window) override;
54 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; 54 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
55 int GetNumDisplays() const override; 55 int GetNumDisplays() const override;
56 std::vector<display::Display> GetAllDisplays() const override; 56 std::vector<display::Display> GetAllDisplays() const override;
57 bool GetDisplayWithDisplayId(int64_t display_id,
58 display::Display* display) const override;
57 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override; 59 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
58 display::Display GetDisplayNearestPoint( 60 display::Display GetDisplayNearestPoint(
59 const gfx::Point& point) const override; 61 const gfx::Point& point) const override;
60 display::Display GetDisplayMatching( 62 display::Display GetDisplayMatching(
61 const gfx::Rect& match_rect) const override; 63 const gfx::Rect& match_rect) const override;
62 display::Display GetPrimaryDisplay() const override; 64 display::Display GetPrimaryDisplay() const override;
63 void AddObserver(display::DisplayObserver* observer) override; 65 void AddObserver(display::DisplayObserver* observer) override;
64 void RemoveObserver(display::DisplayObserver* observer) override; 66 void RemoveObserver(display::DisplayObserver* observer) override;
65 67
66 private: 68 private:
67 explicit HeadlessScreen(const gfx::Rect& screen_bounds); 69 explicit HeadlessScreen(const gfx::Rect& screen_bounds);
68 70
69 aura::WindowTreeHost* host_; 71 aura::WindowTreeHost* host_;
70 display::Display display_; 72 display::Display display_;
71 float ui_scale_; 73 float ui_scale_;
72 74
73 DISALLOW_COPY_AND_ASSIGN(HeadlessScreen); 75 DISALLOW_COPY_AND_ASSIGN(HeadlessScreen);
74 }; 76 };
75 77
76 } // namespace headless 78 } // namespace headless
77 79
78 #endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_ 80 #endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698