diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 20:42:28 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 20:42:28 +0000 |
commit | bc335801071e5e07c2bb0f45992fb3a8f8010198 (patch) | |
tree | 697e86f9239100471975fb24302b5953b429e2a4 /mojo/examples/browser | |
parent | f35c32b023487569ba0d9779906b331dd795c829 (diff) | |
download | chromium_src-bc335801071e5e07c2bb0f45992fb3a8f8010198.zip chromium_src-bc335801071e5e07c2bb0f45992fb3a8f8010198.tar.gz chromium_src-bc335801071e5e07c2bb0f45992fb3a8f8010198.tar.bz2 |
Nukes view_manager namespace
BUG=none
TEST=none
R=ben@chromium.org
Review URL: https://codereview.chromium.org/418983002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285361 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/browser')
-rw-r--r-- | mojo/examples/browser/browser.cc | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/mojo/examples/browser/browser.cc b/mojo/examples/browser/browser.cc index 40d1caa..dce11ad 100644 --- a/mojo/examples/browser/browser.cc +++ b/mojo/examples/browser/browser.cc @@ -70,7 +70,7 @@ class KeyboardManager public: KeyboardManager(views::Widget* widget, IWindowManager* window_manager, - view_manager::Node* node) + Node* node) : widget_(widget), window_manager_(window_manager), node_(node), @@ -139,8 +139,8 @@ class KeyboardManager views::Widget* widget_; IWindowManager* window_manager_; - view_manager::Node* node_; - view_manager::Id last_view_id_; + Node* node_; + Id last_view_id_; views::View* focused_view_; DISALLOW_COPY_AND_ASSIGN(KeyboardManager); @@ -149,9 +149,9 @@ class KeyboardManager // This is the basics of creating a views widget with a textfield. // TODO: cleanup! class Browser : public ApplicationDelegate, - public view_manager::ViewManagerDelegate, + public ViewManagerDelegate, public views::TextfieldController, - public view_manager::NodeObserver { + public NodeObserver { public: Browser() : view_manager_(NULL), @@ -178,7 +178,7 @@ class Browser : public ApplicationDelegate, return true; } - void CreateWidget(view_manager::Node* node) { + void CreateWidget(Node* node) { views::Textfield* textfield = new views::Textfield; textfield->set_controller(this); @@ -202,19 +202,18 @@ class Browser : public ApplicationDelegate, textfield->RequestFocus(); } - // view_manager::ViewManagerDelegate: - virtual void OnRootAdded(view_manager::ViewManager* view_manager, - view_manager::Node* root) OVERRIDE { + // ViewManagerDelegate: + virtual void OnRootAdded(ViewManager* view_manager, Node* root) OVERRIDE { // TODO: deal with OnRootAdded() being invoked multiple times. view_manager_ = view_manager; root_ = root; root_->AddObserver(this); - root_->SetActiveView(view_manager::View::Create(view_manager)); + root_->SetActiveView(View::Create(view_manager)); root_->SetFocus(); CreateWidget(root_); } virtual void OnViewManagerDisconnected( - view_manager::ViewManager* view_manager) OVERRIDE { + ViewManager* view_manager) OVERRIDE { DCHECK_EQ(view_manager_, view_manager); view_manager_ = NULL; base::MessageLoop::current()->Quit(); @@ -237,8 +236,8 @@ class Browser : public ApplicationDelegate, } // NodeObserver: - virtual void OnNodeFocusChanged(view_manager::Node* gained_focus, - view_manager::Node* lost_focus) OVERRIDE { + virtual void OnNodeFocusChanged(Node* gained_focus, + Node* lost_focus) OVERRIDE { aura::client::FocusClient* focus_client = aura::client::GetFocusClient(widget_->GetNativeView()); if (lost_focus == root_) @@ -246,7 +245,7 @@ class Browser : public ApplicationDelegate, else if (gained_focus == root_) focus_client->FocusWindow(widget_->GetNativeView()); } - virtual void OnNodeDestroyed(view_manager::Node* node) OVERRIDE { + virtual void OnNodeDestroyed(Node* node) OVERRIDE { DCHECK_EQ(root_, node); node->RemoveObserver(this); root_ = NULL; @@ -254,9 +253,9 @@ class Browser : public ApplicationDelegate, scoped_ptr<ViewsInit> views_init_; - view_manager::ViewManager* view_manager_; - view_manager::ViewManagerClientFactory view_manager_client_factory_; - view_manager::Node* root_; + ViewManager* view_manager_; + ViewManagerClientFactory view_manager_client_factory_; + Node* root_; views::Widget* widget_; navigation::NavigatorHostPtr navigator_host_; IWindowManagerPtr window_manager_; |