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

Side by Side Diff: components/mus/public/cpp/window_tree_connection.h

Issue 1881253002: mus: Implement ScreenMus::GetCursorScreenPoint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with tot Created 4 years, 7 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 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 COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "components/mus/common/types.h" 14 #include "components/mus/common/types.h"
15 #include "components/mus/public/interfaces/input_event_constants.mojom.h" 15 #include "components/mus/public/interfaces/input_event_constants.mojom.h"
16 #include "components/mus/public/interfaces/window_tree.mojom.h" 16 #include "components/mus/public/interfaces/window_tree.mojom.h"
17 #include "mojo/public/cpp/bindings/interface_request.h" 17 #include "mojo/public/cpp/bindings/interface_request.h"
18 18
19 namespace gfx {
20 class Point;
21 }
22
19 namespace shell { 23 namespace shell {
20 class Connector; 24 class Connector;
21 } 25 }
22 26
23 namespace mus { 27 namespace mus {
24 28
25 class Window; 29 class Window;
26 class WindowManagerDelegate; 30 class WindowManagerDelegate;
27 class WindowTreeConnectionObserver; 31 class WindowTreeConnectionObserver;
28 class WindowTreeDelegate; 32 class WindowTreeDelegate;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // input capture, or if another app has capture. 75 // input capture, or if another app has capture.
72 virtual Window* GetCaptureWindow() = 0; 76 virtual Window* GetCaptureWindow() = 0;
73 77
74 // Returns the focused window; null if focus is not yet known or another app 78 // Returns the focused window; null if focus is not yet known or another app
75 // is focused. 79 // is focused.
76 virtual Window* GetFocusedWindow() = 0; 80 virtual Window* GetFocusedWindow() = 0;
77 81
78 // Sets focus to null. This does nothing if focus is currently null. 82 // Sets focus to null. This does nothing if focus is currently null.
79 virtual void ClearFocus() = 0; 83 virtual void ClearFocus() = 0;
80 84
85 // Returns the current location of the mouse on screen. Note: this method may
86 // race the asynchronous initialization; but in that case we return (0, 0).
87 virtual gfx::Point GetCursorScreenPoint() = 0;
88
81 // See description in window_tree.mojom. When an existing event observer is 89 // See description in window_tree.mojom. When an existing event observer is
82 // updated or cleared then any future events from the server for that observer 90 // updated or cleared then any future events from the server for that observer
83 // will be ignored. 91 // will be ignored.
84 virtual void SetEventObserver(mojom::EventMatcherPtr matcher) = 0; 92 virtual void SetEventObserver(mojom::EventMatcherPtr matcher) = 0;
85 93
86 // Creates and returns a new Window (which is owned by the window server). 94 // Creates and returns a new Window (which is owned by the window server).
87 // Windows are initially hidden, use SetVisible(true) to show. 95 // Windows are initially hidden, use SetVisible(true) to show.
88 Window* NewWindow() { return NewWindow(nullptr); } 96 Window* NewWindow() { return NewWindow(nullptr); }
89 virtual Window* NewWindow( 97 virtual Window* NewWindow(
90 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; 98 const std::map<std::string, std::vector<uint8_t>>* properties) = 0;
91 virtual Window* NewTopLevelWindow( 99 virtual Window* NewTopLevelWindow(
92 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; 100 const std::map<std::string, std::vector<uint8_t>>* properties) = 0;
93 101
94 // Returns the id for this connection. 102 // Returns the id for this connection.
95 // TODO(sky): remove this. It is not necessarily correct anymore. 103 // TODO(sky): remove this. It is not necessarily correct anymore.
96 virtual ConnectionSpecificId GetConnectionId() = 0; 104 virtual ConnectionSpecificId GetConnectionId() = 0;
97 105
98 virtual void AddObserver(WindowTreeConnectionObserver* observer) = 0; 106 virtual void AddObserver(WindowTreeConnectionObserver* observer) = 0;
99 virtual void RemoveObserver(WindowTreeConnectionObserver* observer) = 0; 107 virtual void RemoveObserver(WindowTreeConnectionObserver* observer) = 0;
100 }; 108 };
101 109
102 } // namespace mus 110 } // namespace mus
103 111
104 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ 112 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698