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

Side by Side Diff: mojo/services/public/cpp/view_manager/view_observer.h

Issue 658923003: Remove dependency on ui from view_manager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 #include "mojo/services/public/cpp/view_manager/view.h" 12 #include "mojo/services/public/cpp/view_manager/view.h"
13 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h" 13 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h"
14 14
15 namespace gfx {
16 class Rect;
17 }
18
19 namespace mojo { 15 namespace mojo {
20 16
21 class View; 17 class View;
22 18
23 // A note on -ing and -ed suffixes: 19 // A note on -ing and -ed suffixes:
24 // 20 //
25 // -ing methods are called before changes are applied to the local view model. 21 // -ing methods are called before changes are applied to the local view model.
26 // -ed methods are called after changes are applied to the local view model. 22 // -ed methods are called after changes are applied to the local view model.
27 // 23 //
28 // If the change originated from another connection to the view manager, it's 24 // If the change originated from another connection to the view manager, it's
(...skipping 18 matching lines...) Expand all
47 View* relative_view, 43 View* relative_view,
48 OrderDirection direction) {} 44 OrderDirection direction) {}
49 virtual void OnViewReordered(View* view, 45 virtual void OnViewReordered(View* view,
50 View* relative_view, 46 View* relative_view,
51 OrderDirection direction) {} 47 OrderDirection direction) {}
52 48
53 virtual void OnViewDestroying(View* view) {} 49 virtual void OnViewDestroying(View* view) {}
54 virtual void OnViewDestroyed(View* view) {} 50 virtual void OnViewDestroyed(View* view) {}
55 51
56 virtual void OnViewBoundsChanging(View* view, 52 virtual void OnViewBoundsChanging(View* view,
57 const gfx::Rect& old_bounds, 53 const Rect& old_bounds,
58 const gfx::Rect& new_bounds) {} 54 const Rect& new_bounds) {}
59 virtual void OnViewBoundsChanged(View* view, 55 virtual void OnViewBoundsChanged(View* view,
60 const gfx::Rect& old_bounds, 56 const Rect& old_bounds,
61 const gfx::Rect& new_bounds) {} 57 const Rect& new_bounds) {}
62 58
63 virtual void OnViewFocusChanged(View* gained_focus, View* lost_focus) {} 59 virtual void OnViewFocusChanged(View* gained_focus, View* lost_focus) {}
64 60
65 virtual void OnViewInputEvent(View* view, const EventPtr& event) {} 61 virtual void OnViewInputEvent(View* view, const EventPtr& event) {}
66 62
67 virtual void OnViewVisibilityChanging(View* view) {} 63 virtual void OnViewVisibilityChanging(View* view) {}
68 virtual void OnViewVisibilityChanged(View* view) {} 64 virtual void OnViewVisibilityChanged(View* view) {}
69 65
70 // Sent when the drawn state changes. This is only sent for the root nodes 66 // Sent when the drawn state changes. This is only sent for the root nodes
71 // when embedded. 67 // when embedded.
72 virtual void OnViewDrawnChanging(View* view) {} 68 virtual void OnViewDrawnChanging(View* view) {}
73 virtual void OnViewDrawnChanged(View* view) {} 69 virtual void OnViewDrawnChanged(View* view) {}
74 70
75 protected: 71 protected:
76 virtual ~ViewObserver() {} 72 virtual ~ViewObserver() {}
77 }; 73 };
78 74
79 } // namespace mojo 75 } // namespace mojo
80 76
81 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_ 77 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698