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

Side by Side Diff: components/mus/ws/platform_display_delegate.h

Issue 2021483002: mus: Remove ViewportMetrics from mojom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 | « components/mus/ws/platform_display.cc ('k') | components/mus/ws/test_utils.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 COMPONENTS_MUS_WS_PLATFORM_DISPLAY_DELEGATE_H_ 5 #ifndef COMPONENTS_MUS_WS_PLATFORM_DISPLAY_DELEGATE_H_
6 #define COMPONENTS_MUS_WS_PLATFORM_DISPLAY_DELEGATE_H_ 6 #define COMPONENTS_MUS_WS_PLATFORM_DISPLAY_DELEGATE_H_
7 7
8 #include "components/mus/public/interfaces/window_tree.mojom.h"
9 #include "components/mus/ws/ids.h" 8 #include "components/mus/ws/ids.h"
10 9
11 namespace ui { 10 namespace ui {
12 class Event; 11 class Event;
13 } 12 }
14 13
15 namespace mus { 14 namespace mus {
16 15
17 namespace ws { 16 namespace ws {
18 17
19 class ServerWindow; 18 class ServerWindow;
19 struct ViewportMetrics;
20 20
21 // PlatformDisplayDelegate is implemented by an object that manages the 21 // PlatformDisplayDelegate is implemented by an object that manages the
22 // lifetime of a PlatformDisplay, forwards events to the appropriate windows, 22 // lifetime of a PlatformDisplay, forwards events to the appropriate windows,
23 /// and responses to changes in viewport size. 23 /// and responses to changes in viewport size.
24 class PlatformDisplayDelegate { 24 class PlatformDisplayDelegate {
25 public: 25 public:
26 // Returns the root window of this display. 26 // Returns the root window of this display.
27 virtual ServerWindow* GetRootWindow() = 0; 27 virtual ServerWindow* GetRootWindow() = 0;
28 28
29 // Called when the window managed by the PlatformDisplay is closed. 29 // Called when the window managed by the PlatformDisplay is closed.
30 virtual void OnDisplayClosed() = 0; 30 virtual void OnDisplayClosed() = 0;
31 31
32 // Called when an event arrives. 32 // Called when an event arrives.
33 virtual void OnEvent(const ui::Event& event) = 0; 33 virtual void OnEvent(const ui::Event& event) = 0;
34 34
35 // Called when the Display loses capture. 35 // Called when the Display loses capture.
36 virtual void OnNativeCaptureLost() = 0; 36 virtual void OnNativeCaptureLost() = 0;
37 37
38 // Signals that the metrics of this display's viewport has changed. 38 // Signals that the metrics of this display's viewport has changed.
39 virtual void OnViewportMetricsChanged( 39 virtual void OnViewportMetricsChanged(const ViewportMetrics& old_metrics,
40 const mojom::ViewportMetrics& old_metrics, 40 const ViewportMetrics& new_metrics) = 0;
41 const mojom::ViewportMetrics& new_metrics) = 0;
42 41
43 // Called when a compositor frame is finished drawing. 42 // Called when a compositor frame is finished drawing.
44 virtual void OnCompositorFrameDrawn() = 0; 43 virtual void OnCompositorFrameDrawn() = 0;
45 44
46 protected: 45 protected:
47 virtual ~PlatformDisplayDelegate() {} 46 virtual ~PlatformDisplayDelegate() {}
48 }; 47 };
49 48
50 } // namespace ws 49 } // namespace ws
51 50
52 } // namespace mus 51 } // namespace mus
53 52
54 #endif // COMPONENTS_MUS_WS_PLATFORM_DISPLAY_DELEGATE_H_ 53 #endif // COMPONENTS_MUS_WS_PLATFORM_DISPLAY_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/mus/ws/platform_display.cc ('k') | components/mus/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698