Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / mojo / services / view_manager / node_delegate.h
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.
4
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_
7
8 #include "mojo/services/view_manager/view_manager_export.h"
9
10 namespace gfx {
11 class Rect;
12 }
13
14 namespace mojo {
15 namespace service {
16
17 class Node;
18
19 class MOJO_VIEW_MANAGER_EXPORT NodeDelegate {
20  public:
21   // Invoked at the end of the Node's destructor (after it has been removed from
22   // the hierarchy and its active view has been reset).
23   virtual void OnNodeDestroyed(const Node* node) = 0;
24
25   // Invoked when the hierarchy has changed.
26   virtual void OnNodeHierarchyChanged(const Node* node,
27                                       const Node* new_parent,
28                                       const Node* old_parent) = 0;
29
30   virtual void OnNodeBoundsChanged(const Node* node,
31                                    const gfx::Rect& old_bounds,
32                                    const gfx::Rect& new_bounds) = 0;
33
34  protected:
35   virtual ~NodeDelegate() {}
36 };
37
38 }  // namespace service
39 }  // namespace mojo
40
41 #endif  // MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_