| Index: mojo/services/public/cpp/view_manager/view_observer.h
|
| diff --git a/mojo/services/public/cpp/view_manager/node_observer.h b/mojo/services/public/cpp/view_manager/view_observer.h
|
| similarity index 56%
|
| rename from mojo/services/public/cpp/view_manager/node_observer.h
|
| rename to mojo/services/public/cpp/view_manager/view_observer.h
|
| index 0134c62d617ad80492b7bc22637e57b1dc3a69b2..2be9dbcdfe3c325a50dee5f6e205f4dd1e880adb 100644
|
| --- a/mojo/services/public/cpp/view_manager/node_observer.h
|
| +++ b/mojo/services/public/cpp/view_manager/view_observer.h
|
| @@ -2,14 +2,14 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_
|
| -#define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_
|
| +#ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_
|
| +#define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_
|
|
|
| #include <vector>
|
|
|
| #include "base/basictypes.h"
|
|
|
| -#include "mojo/services/public/cpp/view_manager/node.h"
|
| +#include "mojo/services/public/cpp/view_manager/view.h"
|
| #include "mojo/services/public/interfaces/input_events/input_events.mojom.h"
|
|
|
| namespace gfx {
|
| @@ -18,57 +18,56 @@ class Rect;
|
|
|
| namespace mojo {
|
|
|
| -class Node;
|
| class View;
|
|
|
| // A note on -ing and -ed suffixes:
|
| //
|
| -// -ing methods are called before changes are applied to the local node model.
|
| -// -ed methods are called after changes are applied to the local node model.
|
| +// -ing methods are called before changes are applied to the local view model.
|
| +// -ed methods are called after changes are applied to the local view model.
|
| //
|
| // If the change originated from another connection to the view manager, it's
|
| // possible that the change has already been applied to the service-side model
|
| -// prior to being called, so for example in the case of OnNodeDestroying(), it's
|
| -// possible the node has already been destroyed on the service side.
|
| +// prior to being called, so for example in the case of OnViewDestroying(), it's
|
| +// possible the view has already been destroyed on the service side.
|
|
|
| -class NodeObserver {
|
| +class ViewObserver {
|
| public:
|
| struct TreeChangeParams {
|
| TreeChangeParams();
|
| - Node* target;
|
| - Node* old_parent;
|
| - Node* new_parent;
|
| - Node* receiver;
|
| + View* target;
|
| + View* old_parent;
|
| + View* new_parent;
|
| + View* receiver;
|
| };
|
|
|
| virtual void OnTreeChanging(const TreeChangeParams& params) {}
|
| virtual void OnTreeChanged(const TreeChangeParams& params) {}
|
|
|
| - virtual void OnNodeReordering(Node* node,
|
| - Node* relative_node,
|
| + virtual void OnViewReordering(View* view,
|
| + View* relative_view,
|
| OrderDirection direction) {}
|
| - virtual void OnNodeReordered(Node* node,
|
| - Node* relative_node,
|
| + virtual void OnViewReordered(View* view,
|
| + View* relative_view,
|
| OrderDirection direction) {}
|
|
|
| - virtual void OnNodeDestroying(Node* node) {}
|
| - virtual void OnNodeDestroyed(Node* node) {}
|
| + virtual void OnViewDestroying(View* view) {}
|
| + virtual void OnViewDestroyed(View* view) {}
|
|
|
| - virtual void OnNodeBoundsChanging(Node* node,
|
| + virtual void OnViewBoundsChanging(View* view,
|
| const gfx::Rect& old_bounds,
|
| const gfx::Rect& new_bounds) {}
|
| - virtual void OnNodeBoundsChanged(Node* node,
|
| + virtual void OnViewBoundsChanged(View* view,
|
| const gfx::Rect& old_bounds,
|
| const gfx::Rect& new_bounds) {}
|
|
|
| - virtual void OnNodeFocusChanged(Node* gained_focus, Node* lost_focus) {}
|
| + virtual void OnViewFocusChanged(View* gained_focus, View* lost_focus) {}
|
|
|
| - virtual void OnNodeInputEvent(Node* node, const EventPtr& event) {}
|
| + virtual void OnViewInputEvent(View* view, const EventPtr& event) {}
|
|
|
| protected:
|
| - virtual ~NodeObserver() {}
|
| + virtual ~ViewObserver() {}
|
| };
|
|
|
| } // namespace mojo
|
|
|
| -#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_
|
| +#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_
|
|
|