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

Side by Side Diff: services/view_manager/server_view_delegate.h

Issue 880743002: Plumb ViewportMetrics change notifications around the world and back. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Now without skydb changes Created 5 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
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_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ 5 #ifndef SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_
6 #define SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ 6 #define SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_
7 7
8 #include "mojo/services/view_manager/public/interfaces/view_manager_constants.mo jom.h" 8 #include "mojo/services/view_manager/public/interfaces/view_manager_constants.mo jom.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 class Rect; 11 class Rect;
12 } 12 }
13 13
14 namespace mojo {
15 class ViewportMetrics;
16 }
17
14 namespace view_manager { 18 namespace view_manager {
15 19
16 class ServerView; 20 class ServerView;
17 21
18 class ServerViewDelegate { 22 class ServerViewDelegate {
19 public: 23 public:
20 // Invoked when a view is about to be destroyed; before any of the children 24 // Invoked when a view is about to be destroyed; before any of the children
21 // have been removed and before the view has been removed from its parent. 25 // have been removed and before the view has been removed from its parent.
22 virtual void OnWillDestroyView(ServerView* view) = 0; 26 virtual void OnWillDestroyView(ServerView* view) = 0;
23 27
24 // Invoked at the end of the View's destructor (after it has been removed from 28 // Invoked at the end of the View's destructor (after it has been removed from
25 // the hierarchy). 29 // the hierarchy).
26 virtual void OnViewDestroyed(const ServerView* view) = 0; 30 virtual void OnViewDestroyed(const ServerView* view) = 0;
27 31
28 virtual void OnWillChangeViewHierarchy(ServerView* view, 32 virtual void OnWillChangeViewHierarchy(ServerView* view,
29 ServerView* new_parent, 33 ServerView* new_parent,
30 ServerView* old_parent) = 0; 34 ServerView* old_parent) = 0;
31 35
32 virtual void OnViewHierarchyChanged(const ServerView* view, 36 virtual void OnViewHierarchyChanged(const ServerView* view,
33 const ServerView* new_parent, 37 const ServerView* new_parent,
34 const ServerView* old_parent) = 0; 38 const ServerView* old_parent) = 0;
35 39
36 virtual void OnViewBoundsChanged(const ServerView* view, 40 virtual void OnViewBoundsChanged(const ServerView* view,
37 const gfx::Rect& old_bounds, 41 const gfx::Rect& old_bounds,
38 const gfx::Rect& new_bounds) = 0; 42 const gfx::Rect& new_bounds) = 0;
39 43
44 virtual void OnViewViewportMetricsChanged(
45 const ServerView* view,
46 const mojo::ViewportMetrics& old_metrics,
47 const mojo::ViewportMetrics& new_metrics) = 0;
48
40 virtual void OnViewSurfaceIdChanged(const ServerView* view) = 0; 49 virtual void OnViewSurfaceIdChanged(const ServerView* view) = 0;
41 50
42 virtual void OnViewReordered(const ServerView* view, 51 virtual void OnViewReordered(const ServerView* view,
43 const ServerView* relative, 52 const ServerView* relative,
44 mojo::OrderDirection direction) = 0; 53 mojo::OrderDirection direction) = 0;
45 54
46 virtual void OnWillChangeViewVisibility(ServerView* view) = 0; 55 virtual void OnWillChangeViewVisibility(ServerView* view) = 0;
47 56
48 virtual void OnViewSharedPropertyChanged( 57 virtual void OnViewSharedPropertyChanged(
49 const ServerView* view, 58 const ServerView* view,
50 const std::string& name, 59 const std::string& name,
51 const std::vector<uint8_t>* new_data) = 0; 60 const std::vector<uint8_t>* new_data) = 0;
52 61
53 virtual void OnScheduleViewPaint(const ServerView* view) = 0; 62 virtual void OnScheduleViewPaint(const ServerView* view) = 0;
54 63
55 protected: 64 protected:
56 virtual ~ServerViewDelegate() {} 65 virtual ~ServerViewDelegate() {}
57 }; 66 };
58 67
59 } // namespace view_manager 68 } // namespace view_manager
60 69
61 #endif // SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ 70 #endif // SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698