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

Side by Side Diff: services/ui/ws/platform_display.h

Issue 2190633002: Add flag to launch two displays for mus+ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. 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 | « services/ui/ws/frame_generator_delegate.h ('k') | services/ui/ws/platform_display.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 SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_H_
6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 virtual void SetImeVisibility(bool visible) = 0; 80 virtual void SetImeVisibility(bool visible) = 0;
81 81
82 // Returns true if a compositor frame has been submitted but not drawn yet. 82 // Returns true if a compositor frame has been submitted but not drawn yet.
83 virtual bool IsFramePending() const = 0; 83 virtual bool IsFramePending() const = 0;
84 84
85 virtual void RequestCopyOfOutput( 85 virtual void RequestCopyOfOutput(
86 std::unique_ptr<cc::CopyOutputRequest> output_request) = 0; 86 std::unique_ptr<cc::CopyOutputRequest> output_request) = 0;
87 87
88 virtual int64_t GetDisplayId() const = 0; 88 virtual int64_t GetDisplayId() const = 0;
89 89
90 virtual gfx::Rect GetBounds() const = 0;
91
90 // Overrides factory for testing. Default (NULL) value indicates regular 92 // Overrides factory for testing. Default (NULL) value indicates regular
91 // (non-test) environment. 93 // (non-test) environment.
92 static void set_factory_for_testing(PlatformDisplayFactory* factory) { 94 static void set_factory_for_testing(PlatformDisplayFactory* factory) {
93 PlatformDisplay::factory_ = factory; 95 PlatformDisplay::factory_ = factory;
94 } 96 }
95 97
96 private: 98 private:
97 // Static factory instance (always NULL for non-test). 99 // Static factory instance (always NULL for non-test).
98 static PlatformDisplayFactory* factory_; 100 static PlatformDisplayFactory* factory_;
99 }; 101 };
(...skipping 17 matching lines...) Expand all
117 void ReleaseCapture() override; 119 void ReleaseCapture() override;
118 void SetCursorById(int32_t cursor) override; 120 void SetCursorById(int32_t cursor) override;
119 float GetDeviceScaleFactor() override; 121 float GetDeviceScaleFactor() override;
120 ::display::Display::Rotation GetRotation() override; 122 ::display::Display::Rotation GetRotation() override;
121 void UpdateTextInputState(const ui::TextInputState& state) override; 123 void UpdateTextInputState(const ui::TextInputState& state) override;
122 void SetImeVisibility(bool visible) override; 124 void SetImeVisibility(bool visible) override;
123 bool IsFramePending() const override; 125 bool IsFramePending() const override;
124 void RequestCopyOfOutput( 126 void RequestCopyOfOutput(
125 std::unique_ptr<cc::CopyOutputRequest> output_request) override; 127 std::unique_ptr<cc::CopyOutputRequest> output_request) override;
126 int64_t GetDisplayId() const override; 128 int64_t GetDisplayId() const override;
129 gfx::Rect GetBounds() const override;
127 130
128 private: 131 private:
129 void UpdateMetrics(const gfx::Size& size, float device_scale_factor); 132 void UpdateMetrics(const gfx::Rect& bounds, float device_scale_factor);
130 133
131 // ui::PlatformWindowDelegate: 134 // ui::PlatformWindowDelegate:
132 void OnBoundsChanged(const gfx::Rect& new_bounds) override; 135 void OnBoundsChanged(const gfx::Rect& new_bounds) override;
133 void OnDamageRect(const gfx::Rect& damaged_region) override; 136 void OnDamageRect(const gfx::Rect& damaged_region) override;
134 void DispatchEvent(ui::Event* event) override; 137 void DispatchEvent(ui::Event* event) override;
135 void OnCloseRequest() override; 138 void OnCloseRequest() override;
136 void OnClosed() override; 139 void OnClosed() override;
137 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; 140 void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
138 void OnLostCapture() override; 141 void OnLostCapture() override;
139 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, 142 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
(...skipping 20 matching lines...) Expand all
160 std::unique_ptr<ui::PlatformWindow> platform_window_; 163 std::unique_ptr<ui::PlatformWindow> platform_window_;
161 164
162 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay); 165 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay);
163 }; 166 };
164 167
165 } // namespace ws 168 } // namespace ws
166 169
167 } // namespace ui 170 } // namespace ui
168 171
169 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 172 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_
OLDNEW
« no previous file with comments | « services/ui/ws/frame_generator_delegate.h ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698