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
3 // found in the LICENSE file.
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_
8 #include "mojo/services/view_manager/view_manager_export.h"
19 class MOJO_VIEW_MANAGER_EXPORT ServerViewDelegate {
21 // Invoked at the end of the View's destructor (after it has been removed from
23 virtual void OnViewDestroyed(const ServerView* view) = 0;
25 virtual void OnWillChangeViewHierarchy(const ServerView* view,
26 const ServerView* new_parent,
27 const ServerView* old_parent) = 0;
29 virtual void OnViewHierarchyChanged(const ServerView* view,
30 const ServerView* new_parent,
31 const ServerView* old_parent) = 0;
33 virtual void OnViewBoundsChanged(const ServerView* view,
34 const gfx::Rect& old_bounds,
35 const gfx::Rect& new_bounds) = 0;
37 virtual void OnViewSurfaceIdChanged(const ServerView* view) = 0;
39 virtual void OnWillChangeViewVisibility(const ServerView* view) = 0;
42 virtual ~ServerViewDelegate() {}
45 } // namespace service
48 #endif // MOJO_SERVICES_VIEW_MANAGER_SERVER_VIEW_DELEGATE_H_