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

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

Issue 1640253003: Makes resolving ids work correctly in new world (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 4 years, 10 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/connection_manager.cc ('k') | components/mus/ws/server_window_surface.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 COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ 5 #ifndef COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_
6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "components/mus/public/interfaces/mus_constants.mojom.h" 9 #include "components/mus/public/interfaces/mus_constants.mojom.h"
10 #include "components/mus/public/interfaces/window_tree.mojom.h"
10 11
11 namespace mus { 12 namespace mus {
12 13
13 class SurfacesState; 14 class SurfacesState;
14 15
15 namespace ws { 16 namespace ws {
16 17
18 struct ClientWindowId;
17 class ServerWindow; 19 class ServerWindow;
18 struct WindowId; 20 struct WindowId;
19 21
20 class ServerWindowDelegate { 22 class ServerWindowDelegate {
21 public: 23 public:
22 virtual SurfacesState* GetSurfacesState() = 0; 24 virtual SurfacesState* GetSurfacesState() = 0;
23 25
24 virtual void OnScheduleWindowPaint(const ServerWindow* window) = 0; 26 virtual void OnScheduleWindowPaint(const ServerWindow* window) = 0;
25 27
26 // Returns the root of the window tree to which this |window| is attached. 28 // Returns the root of the window tree to which this |window| is attached.
27 // Returns null if this window is not attached up through to a root window. 29 // Returns null if this window is not attached up through to a root window.
28 virtual const ServerWindow* GetRootWindow( 30 virtual const ServerWindow* GetRootWindow(
29 const ServerWindow* window) const = 0; 31 const ServerWindow* window) const = 0;
30 32
31 // Schedules a callback to DestroySurfacesScheduledForDestruction() at the 33 // Schedules a callback to DestroySurfacesScheduledForDestruction() at the
32 // appropriate time, which may be synchronously. 34 // appropriate time, which may be synchronously.
33 virtual void ScheduleSurfaceDestruction(ServerWindow* window) = 0; 35 virtual void ScheduleSurfaceDestruction(ServerWindow* window) = 0;
34 36
37 // Used to resolve a reference to a Window by ClientWindowId in submitted
38 // frames. When the client owning |ancestor| (or the client embedded at
39 // |ancestor|) submits a frame the frame may referenced child windows. The
40 // reference is done using an id that is only known to the client. This
41 // function resolves the id into the appropriate window, or null if a window
42 // can't be found.
43 virtual ServerWindow* FindWindowForSurface(
44 const ServerWindow* ancestor,
45 mojom::SurfaceType surface_type,
46 const ClientWindowId& client_window_id) = 0;
47
35 protected: 48 protected:
36 virtual ~ServerWindowDelegate() {} 49 virtual ~ServerWindowDelegate() {}
37 }; 50 };
38 51
39 } // namespace ws 52 } // namespace ws
40 53
41 } // namespace mus 54 } // namespace mus
42 55
43 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ 56 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/mus/ws/connection_manager.cc ('k') | components/mus/ws/server_window_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698