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

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: Actually apply the 32bit patch now that the delegate crash was fixed. Created 4 years, 8 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/window_tree.mojom.h" 15 #include "components/mus/public/interfaces/window_tree.mojom.h"
16 #include "mojo/public/cpp/bindings/interface_request.h" 16 #include "mojo/public/cpp/bindings/interface_request.h"
17 17
18 namespace gfx {
19 class Point;
20 }
21
18 namespace shell { 22 namespace shell {
19 class Connector; 23 class Connector;
20 } 24 }
21 25
22 namespace mus { 26 namespace mus {
23 27
24 class Window; 28 class Window;
25 class WindowManagerDelegate; 29 class WindowManagerDelegate;
26 class WindowTreeConnectionObserver; 30 class WindowTreeConnectionObserver;
27 class WindowTreeDelegate; 31 class WindowTreeDelegate;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // input capture, or if another app has capture. 74 // input capture, or if another app has capture.
71 virtual Window* GetCaptureWindow() = 0; 75 virtual Window* GetCaptureWindow() = 0;
72 76
73 // Returns the focused window; null if focus is not yet known or another app 77 // Returns the focused window; null if focus is not yet known or another app
74 // is focused. 78 // is focused.
75 virtual Window* GetFocusedWindow() = 0; 79 virtual Window* GetFocusedWindow() = 0;
76 80
77 // Sets focus to null. This does nothing if focus is currently null. 81 // Sets focus to null. This does nothing if focus is currently null.
78 virtual void ClearFocus() = 0; 82 virtual void ClearFocus() = 0;
79 83
84 // Performs additional initialization so that we can synchronously retrieve
85 // the cursor location.
86 virtual void InitializeCursorLocation() = 0;
sky 2016/04/27 20:10:28 It seems like what you have implemented is pretty
87
88 // Returns the current location of the mouse on screen. Note: this method may
89 // race the asynchronous initialization; but in that case we return (0, 0).
90 virtual gfx::Point GetCursorScreenPoint() = 0;
91
80 // Creates and returns a new Window (which is owned by the window server). 92 // Creates and returns a new Window (which is owned by the window server).
81 // Windows are initially hidden, use SetVisible(true) to show. 93 // Windows are initially hidden, use SetVisible(true) to show.
82 Window* NewWindow() { return NewWindow(nullptr); } 94 Window* NewWindow() { return NewWindow(nullptr); }
83 virtual Window* NewWindow( 95 virtual Window* NewWindow(
84 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; 96 const std::map<std::string, std::vector<uint8_t>>* properties) = 0;
85 virtual Window* NewTopLevelWindow( 97 virtual Window* NewTopLevelWindow(
86 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; 98 const std::map<std::string, std::vector<uint8_t>>* properties) = 0;
87 99
88 // Returns the id for this connection. 100 // Returns the id for this connection.
89 // TODO(sky): remove this. It is not necessarily correct anymore. 101 // TODO(sky): remove this. It is not necessarily correct anymore.
90 virtual ConnectionSpecificId GetConnectionId() = 0; 102 virtual ConnectionSpecificId GetConnectionId() = 0;
91 103
92 virtual void AddObserver(WindowTreeConnectionObserver* observer) = 0; 104 virtual void AddObserver(WindowTreeConnectionObserver* observer) = 0;
93 virtual void RemoveObserver(WindowTreeConnectionObserver* observer) = 0; 105 virtual void RemoveObserver(WindowTreeConnectionObserver* observer) = 0;
94 }; 106 };
95 107
96 } // namespace mus 108 } // namespace mus
97 109
98 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ 110 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698