Index: services/view_manager/server_view_observer.h |
diff --git a/services/view_manager/server_view_delegate.h b/services/view_manager/server_view_observer.h |
similarity index 57% |
copy from services/view_manager/server_view_delegate.h |
copy to services/view_manager/server_view_observer.h |
index d05a77e1e8e7c7123a68418f4e905e14503cac86..3765027e25ab2576962128bb1e1801aa44c8bb33 100644 |
--- a/services/view_manager/server_view_delegate.h |
+++ b/services/view_manager/server_view_observer.h |
@@ -1,9 +1,9 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ |
-#define SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ |
+#ifndef SERVICES_VIEW_MANAGER_SERVER_VIEW_OBSERVER_H_ |
+#define SERVICES_VIEW_MANAGER_SERVER_VIEW_OBSERVER_H_ |
#include "mojo/services/view_manager/public/interfaces/view_manager_constants.mojom.h" |
@@ -19,47 +19,43 @@ namespace view_manager { |
class ServerView; |
-class ServerViewDelegate { |
+class ServerViewObserver { |
public: |
// Invoked when a view is about to be destroyed; before any of the children |
// have been removed and before the view has been removed from its parent. |
- virtual void OnWillDestroyView(ServerView* view) = 0; |
+ virtual void OnWillDestroyView(const ServerView* view) {} |
// Invoked at the end of the View's destructor (after it has been removed from |
// the hierarchy). |
- virtual void OnViewDestroyed(const ServerView* view) = 0; |
+ virtual void OnViewDestroyed(const ServerView* view) {} |
- virtual void OnWillChangeViewHierarchy(ServerView* view, |
- ServerView* new_parent, |
- ServerView* old_parent) = 0; |
+ virtual void OnWillChangeViewHierarchy(const ServerView* view, |
+ const ServerView* new_parent, |
+ const ServerView* old_parent) {} |
virtual void OnViewHierarchyChanged(const ServerView* view, |
const ServerView* new_parent, |
- const ServerView* old_parent) = 0; |
+ const ServerView* old_parent) {} |
virtual void OnViewBoundsChanged(const ServerView* view, |
const gfx::Rect& old_bounds, |
- const gfx::Rect& new_bounds) = 0; |
- |
- virtual void OnViewSurfaceIdChanged(const ServerView* view) = 0; |
+ const gfx::Rect& new_bounds) {} |
virtual void OnViewReordered(const ServerView* view, |
const ServerView* relative, |
- mojo::OrderDirection direction) = 0; |
+ mojo::OrderDirection direction) {} |
- virtual void OnWillChangeViewVisibility(ServerView* view) = 0; |
+ virtual void OnWillChangeViewVisibility(const ServerView* view) {} |
virtual void OnViewSharedPropertyChanged( |
const ServerView* view, |
const std::string& name, |
- const std::vector<uint8_t>* new_data) = 0; |
- |
- virtual void OnScheduleViewPaint(const ServerView* view) = 0; |
+ const std::vector<uint8_t>* new_data) {} |
protected: |
- virtual ~ServerViewDelegate() {} |
+ virtual ~ServerViewObserver() {} |
}; |
} // namespace view_manager |
-#endif // SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_ |
+#endif // SERVICES_VIEW_MANAGER_SERVER_VIEW_OBSERVER_H_ |