[Drive] Handle error cases earlier in FakeDriveService
[chromium-blink-merge.git] / mojo / services / view_manager / node_delegate.h
blob981f4b33ef645f2cb199fed3394eedd48945e744
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_NODE_DELEGATE_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_
8 #include "mojo/services/view_manager/view_manager_export.h"
10 namespace gfx {
11 class Rect;
14 namespace mojo {
15 namespace service {
17 class Node;
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;
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;
30 virtual void OnNodeBoundsChanged(const Node* node,
31 const gfx::Rect& old_bounds,
32 const gfx::Rect& new_bounds) = 0;
34 protected:
35 virtual ~NodeDelegate() {}
38 } // namespace service
39 } // namespace mojo
41 #endif // MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_