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

Unified Diff: mojo/services/public/cpp/view_manager/view_observer.h

Issue 732223002: Rebuild aura::Window's property system on top of mojo::View. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: The rest of the sky comments from the previous review. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/public/cpp/view_manager/view.h ('k') | mojo/services/public/cpp/view_manager/view_property.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/cpp/view_manager/view_observer.h
diff --git a/mojo/services/public/cpp/view_manager/view_observer.h b/mojo/services/public/cpp/view_manager/view_observer.h
index 480f6601620272fcbe68810028a71d913a8d438b..fd31c972951078f2b2492e28147638521ad9b82d 100644
--- a/mojo/services/public/cpp/view_manager/view_observer.h
+++ b/mojo/services/public/cpp/view_manager/view_observer.h
@@ -63,10 +63,26 @@ class ViewObserver {
virtual void OnViewVisibilityChanging(View* view) {}
virtual void OnViewVisibilityChanged(View* view) {}
- virtual void OnViewPropertyChanged(View* view,
- const std::string& name,
- const std::vector<uint8_t>* old_data,
- const std::vector<uint8_t>* new_data) {}
+ // Invoked when this View's shared properties have changed. This can either
+ // be caused by SetSharedProperty() being called locally, or by us receiving
+ // a mojo message that this property has changed. If this property has been
+ // added, |old_data| is null. If this property was removed, |new_data| is
+ // null.
+ virtual void OnViewSharedPropertyChanged(
+ View* view,
+ const std::string& name,
+ const std::vector<uint8_t>* old_data,
+ const std::vector<uint8_t>* new_data) {}
+
+ // Invoked when SetProperty() or ClearProperty() is called on the window.
+ // |key| is either a WindowProperty<T>* (SetProperty, ClearProperty). Either
+ // way, it can simply be compared for equality with the property
+ // constant. |old| is the old property value, which must be cast to the
+ // appropriate type before use.
+ virtual void OnViewLocalPropertyChanged(
+ View* view,
+ const void* key,
+ intptr_t old) {}
virtual void OnViewEmbeddedAppDisconnected(View* view) {}
« no previous file with comments | « mojo/services/public/cpp/view_manager/view.h ('k') | mojo/services/public/cpp/view_manager/view_property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698