Upstream version 7.36.149.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 mojo {
11 namespace services {
12 namespace view_manager {
13
14 struct NodeId;
15 struct ViewId;
16
17 class MOJO_VIEW_MANAGER_EXPORT NodeDelegate {
18  public:
19   // Invoked when the hierarchy has changed.
20   virtual void OnNodeHierarchyChanged(const NodeId& node,
21                                       const NodeId& new_parent,
22                                       const NodeId& old_parent) = 0;
23
24   // Invoked when the View associated with a node changes.
25   virtual void OnNodeViewReplaced(const NodeId& node,
26                                   const ViewId& new_view_id,
27                                   const ViewId& old_view_id) = 0;
28
29  protected:
30   virtual ~NodeDelegate() {}
31 };
32
33 }  // namespace view_manager
34 }  // namespace services
35 }  // namespace mojo
36
37 #endif  // MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_