summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 20:42:28 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 20:42:28 +0000
commitbc335801071e5e07c2bb0f45992fb3a8f8010198 (patch)
tree697e86f9239100471975fb24302b5953b429e2a4
parentf35c32b023487569ba0d9779906b331dd795c829 (diff)
downloadchromium_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
-rw-r--r--mojo/aura/window_tree_host_mojo.cc6
-rw-r--r--mojo/aura/window_tree_host_mojo.h11
-rw-r--r--mojo/examples/aura_demo/aura_demo.cc15
-rw-r--r--mojo/examples/aura_demo/view_manager_init.cc2
-rw-r--r--mojo/examples/browser/browser.cc33
-rw-r--r--mojo/examples/demo_launcher/demo_launcher.cc2
-rw-r--r--mojo/examples/embedded_app/embedded_app.cc12
-rw-r--r--mojo/examples/keyboard/keyboard.cc19
-rw-r--r--mojo/examples/media_viewer/media_viewer.cc35
-rw-r--r--mojo/examples/nesting_app/nesting_app.cc8
-rw-r--r--mojo/examples/png_viewer/png_viewer.cc29
-rw-r--r--mojo/examples/window_manager/debug_panel.cc2
-rw-r--r--mojo/examples/window_manager/debug_panel.h6
-rw-r--r--mojo/examples/window_manager/window_manager.cc14
-rw-r--r--mojo/examples/wm_flow/app/app.cc18
-rw-r--r--mojo/examples/wm_flow/init/init.cc2
-rw-r--r--mojo/examples/wm_flow/wm/wm.cc28
-rw-r--r--mojo/services/html_viewer/html_document_view.cc12
-rw-r--r--mojo/services/html_viewer/html_document_view.h23
-rw-r--r--mojo/services/html_viewer/html_viewer.cc12
-rw-r--r--mojo/services/public/cpp/view_manager/lib/node.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/node_observer.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/node_private.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/node_private.h2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_manager_client_factory.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h3
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_manager_unittests.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_private.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/lib/view_private.h2
-rw-r--r--mojo/services/public/cpp/view_manager/node.h2
-rw-r--r--mojo/services/public/cpp/view_manager/node_observer.h2
-rw-r--r--mojo/services/public/cpp/view_manager/tests/node_unittest.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc2
-rw-r--r--mojo/services/public/cpp/view_manager/types.h2
-rw-r--r--mojo/services/public/cpp/view_manager/util.h2
-rw-r--r--mojo/services/public/cpp/view_manager/view.h2
-rw-r--r--mojo/services/public/cpp/view_manager/view_manager.h3
-rw-r--r--mojo/services/public/cpp/view_manager/view_manager_client_factory.h2
-rw-r--r--mojo/services/public/cpp/view_manager/view_manager_delegate.h2
-rw-r--r--mojo/services/public/cpp/view_manager/view_observer.h2
-rw-r--r--mojo/services/public/cpp/view_manager/window_manager_delegate.h2
-rw-r--r--mojo/services/public/interfaces/view_manager/view_manager.mojom2
-rw-r--r--mojo/services/public/interfaces/view_manager/view_manager_constants.mojom2
-rw-r--r--mojo/services/view_manager/context_factory_impl.cc2
-rw-r--r--mojo/services/view_manager/context_factory_impl.h2
-rw-r--r--mojo/services/view_manager/ids.h2
-rw-r--r--mojo/services/view_manager/main.cc4
-rw-r--r--mojo/services/view_manager/node.cc4
-rw-r--r--mojo/services/view_manager/node.h2
-rw-r--r--mojo/services/view_manager/node_delegate.h2
-rw-r--r--mojo/services/view_manager/root_node_manager.cc2
-rw-r--r--mojo/services/view_manager/root_node_manager.h2
-rw-r--r--mojo/services/view_manager/root_view_manager.cc2
-rw-r--r--mojo/services/view_manager/root_view_manager.h2
-rw-r--r--mojo/services/view_manager/root_view_manager_delegate.h2
-rw-r--r--mojo/services/view_manager/screen_impl.cc2
-rw-r--r--mojo/services/view_manager/screen_impl.h2
-rw-r--r--mojo/services/view_manager/test_change_tracker.cc2
-rw-r--r--mojo/services/view_manager/test_change_tracker.h2
-rw-r--r--mojo/services/view_manager/view.cc2
-rw-r--r--mojo/services/view_manager/view.h2
-rw-r--r--mojo/services/view_manager/view_manager_init_service_context.cc2
-rw-r--r--mojo/services/view_manager/view_manager_init_service_context.h2
-rw-r--r--mojo/services/view_manager/view_manager_init_service_impl.cc2
-rw-r--r--mojo/services/view_manager/view_manager_init_service_impl.h2
-rw-r--r--mojo/services/view_manager/view_manager_service_impl.cc2
-rw-r--r--mojo/services/view_manager/view_manager_service_impl.h2
-rw-r--r--mojo/services/view_manager/view_manager_unittest.cc2
-rw-r--r--mojo/services/view_manager/window_tree_host_impl.cc2
-rw-r--r--mojo/services/view_manager/window_tree_host_impl.h2
-rw-r--r--mojo/services/window_manager/window_manager_api_unittest.cc70
-rw-r--r--mojo/services/window_manager/window_manager_app.cc48
-rw-r--r--mojo/services/window_manager/window_manager_app.h44
-rw-r--r--mojo/services/window_manager/window_manager_service_impl.cc24
-rw-r--r--mojo/services/window_manager/window_manager_service_impl.h17
-rw-r--r--mojo/shell/view_manager_loader.cc3
-rw-r--r--mojo/shell/view_manager_loader.h8
-rw-r--r--mojo/views/native_widget_view_manager.cc16
-rw-r--r--mojo/views/native_widget_view_manager.h29
83 files changed, 255 insertions, 407 deletions
diff --git a/mojo/aura/window_tree_host_mojo.cc b/mojo/aura/window_tree_host_mojo.cc
index 0b67e54..d92e355 100644
--- a/mojo/aura/window_tree_host_mojo.cc
+++ b/mojo/aura/window_tree_host_mojo.cc
@@ -61,7 +61,7 @@ class TreeHosts : public base::SupportsUserData::Data {
////////////////////////////////////////////////////////////////////////////////
// WindowTreeHostMojo, public:
-WindowTreeHostMojo::WindowTreeHostMojo(view_manager::Node* node,
+WindowTreeHostMojo::WindowTreeHostMojo(Node* node,
WindowTreeHostMojoDelegate* delegate)
: node_(node),
bounds_(node->bounds()),
@@ -157,10 +157,10 @@ ui::EventProcessor* WindowTreeHostMojo::GetEventProcessor() {
}
////////////////////////////////////////////////////////////////////////////////
-// WindowTreeHostMojo, view_manager::NodeObserver implementation:
+// WindowTreeHostMojo, NodeObserver implementation:
void WindowTreeHostMojo::OnNodeBoundsChanged(
- view_manager::Node* node,
+ Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
bounds_ = new_bounds;
diff --git a/mojo/aura/window_tree_host_mojo.h b/mojo/aura/window_tree_host_mojo.h
index 0aa871b..026253a 100644
--- a/mojo/aura/window_tree_host_mojo.h
+++ b/mojo/aura/window_tree_host_mojo.h
@@ -22,10 +22,9 @@ class WindowTreeHostMojoDelegate;
class WindowTreeHostMojo : public aura::WindowTreeHost,
public ui::EventSource,
- public view_manager::NodeObserver {
+ public NodeObserver {
public:
- WindowTreeHostMojo(view_manager::Node* node,
- WindowTreeHostMojoDelegate* delegate);
+ WindowTreeHostMojo(Node* node, WindowTreeHostMojoDelegate* delegate);
virtual ~WindowTreeHostMojo();
// Returns the WindowTreeHostMojo for the specified compositor.
@@ -60,13 +59,13 @@ class WindowTreeHostMojo : public aura::WindowTreeHost,
// ui::EventSource:
virtual ui::EventProcessor* GetEventProcessor() OVERRIDE;
- // view_manager::NodeObserver:
+ // NodeObserver:
virtual void OnNodeBoundsChanged(
- view_manager::Node* node,
+ Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) OVERRIDE;
- view_manager::Node* node_;
+ Node* node_;
gfx::Rect bounds_;
diff --git a/mojo/examples/aura_demo/aura_demo.cc b/mojo/examples/aura_demo/aura_demo.cc
index 71dfd32..c4c9b93 100644
--- a/mojo/examples/aura_demo/aura_demo.cc
+++ b/mojo/examples/aura_demo/aura_demo.cc
@@ -107,7 +107,7 @@ class DemoWindowTreeClient : public aura::client::WindowTreeClient {
class AuraDemo : public ApplicationDelegate,
public WindowTreeHostMojoDelegate,
- public view_manager::ViewManagerDelegate {
+ public ViewManagerDelegate {
public:
AuraDemo()
: window1_(NULL),
@@ -118,11 +118,10 @@ class AuraDemo : public ApplicationDelegate,
virtual ~AuraDemo() {}
private:
- // Overridden from view_manager::ViewManagerDelegate:
- virtual void OnRootAdded(view_manager::ViewManager* view_manager,
- view_manager::Node* root) OVERRIDE {
+ // Overridden from ViewManagerDelegate:
+ virtual void OnRootAdded(ViewManager* view_manager, Node* root) OVERRIDE {
// TODO(beng): this function could be called multiple times!
- view_ = view_manager::View::Create(view_manager);
+ view_ = View::Create(view_manager);
root->SetActiveView(view_);
window_tree_host_.reset(new WindowTreeHostMojo(root, this));
@@ -155,7 +154,7 @@ class AuraDemo : public ApplicationDelegate,
window_tree_host_->Show();
}
virtual void OnViewManagerDisconnected(
- view_manager::ViewManager* view_manager) OVERRIDE {
+ ViewManager* view_manager) OVERRIDE {
base::MessageLoop::current()->Quit();
}
@@ -192,9 +191,9 @@ class AuraDemo : public ApplicationDelegate,
aura::Window* window2_;
aura::Window* window21_;
- view_manager::View* view_;
+ View* view_;
- view_manager::ViewManagerClientFactory view_manager_client_factory_;
+ ViewManagerClientFactory view_manager_client_factory_;
scoped_ptr<aura::WindowTreeHost> window_tree_host_;
diff --git a/mojo/examples/aura_demo/view_manager_init.cc b/mojo/examples/aura_demo/view_manager_init.cc
index d6414cb..845f8e1 100644
--- a/mojo/examples/aura_demo/view_manager_init.cc
+++ b/mojo/examples/aura_demo/view_manager_init.cc
@@ -31,7 +31,7 @@ class ViewManagerInit : public ApplicationDelegate {
VLOG(1) << "ViewManagerInit::DidConnection result=" << result;
}
- view_manager::ViewManagerInitServicePtr view_manager_init_;
+ ViewManagerInitServicePtr view_manager_init_;
DISALLOW_COPY_AND_ASSIGN(ViewManagerInit);
};
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_;
diff --git a/mojo/examples/demo_launcher/demo_launcher.cc b/mojo/examples/demo_launcher/demo_launcher.cc
index 273e5ac..86a1b3d 100644
--- a/mojo/examples/demo_launcher/demo_launcher.cc
+++ b/mojo/examples/demo_launcher/demo_launcher.cc
@@ -33,7 +33,7 @@ class DemoLauncher : public ApplicationDelegate {
void OnConnect(bool success) {}
- view_manager::ViewManagerInitServicePtr view_manager_init_;
+ ViewManagerInitServicePtr view_manager_init_;
DISALLOW_COPY_AND_ASSIGN(DemoLauncher);
};
diff --git a/mojo/examples/embedded_app/embedded_app.cc b/mojo/examples/embedded_app/embedded_app.cc
index 7e555cd..9fc72ef 100644
--- a/mojo/examples/embedded_app/embedded_app.cc
+++ b/mojo/examples/embedded_app/embedded_app.cc
@@ -23,14 +23,6 @@
#include "url/gurl.h"
#include "url/url_util.h"
-using mojo::view_manager::Node;
-using mojo::view_manager::NodeObserver;
-using mojo::view_manager::View;
-using mojo::view_manager::ViewManager;
-using mojo::view_manager::ViewManagerDelegate;
-using mojo::view_manager::ViewManagerClientFactory;
-using mojo::view_manager::ViewObserver;
-
namespace mojo {
namespace examples {
class EmbeddedApp;
@@ -141,12 +133,12 @@ class EmbeddedApp : public ApplicationDelegate,
pending_node_colors_.erase(color);
}
- view_manager::ViewManager* view_manager_;
+ ViewManager* view_manager_;
navigation::NavigatorHostPtr navigator_host_;
std::map<Node*, View*> views_to_reap_;
ViewManagerClientFactory view_manager_client_factory_;
- typedef std::map<view_manager::Id, Node*> RootMap;
+ typedef std::map<Id, Node*> RootMap;
RootMap roots_;
// We can receive navigations for nodes we don't have yet.
diff --git a/mojo/examples/keyboard/keyboard.cc b/mojo/examples/keyboard/keyboard.cc
index f4f22b7..13eb4c7 100644
--- a/mojo/examples/keyboard/keyboard.cc
+++ b/mojo/examples/keyboard/keyboard.cc
@@ -26,8 +26,6 @@
#include "ui/views/widget/widget_delegate.h"
#include "url/gurl.h"
-using mojo::view_manager::Id;
-
namespace mojo {
namespace examples {
@@ -49,7 +47,7 @@ class KeyboardServiceImpl : public InterfaceImpl<KeyboardService> {
class Keyboard
: public ApplicationDelegate,
- public view_manager::ViewManagerDelegate,
+ public ViewManagerDelegate,
public KeyboardDelegate,
public InterfaceFactoryWithContext<KeyboardServiceImpl, Keyboard> {
public:
@@ -79,7 +77,7 @@ class Keyboard
return true;
}
- void CreateWidget(view_manager::Node* node) {
+ void CreateWidget(Node* node) {
views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView;
widget_delegate->GetContentsView()->AddChildView(new KeyboardView(this));
widget_delegate->GetContentsView()->SetLayoutManager(new views::FillLayout);
@@ -94,16 +92,15 @@ class Keyboard
widget->Show();
}
- // 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->SetActiveView(view_manager::View::Create(view_manager));
+ root->SetActiveView(View::Create(view_manager));
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();
@@ -119,8 +116,8 @@ class Keyboard
scoped_ptr<ViewsInit> views_init_;
- view_manager::ViewManager* view_manager_;
- view_manager::ViewManagerClientFactory view_manager_client_factory_;
+ ViewManager* view_manager_;
+ ViewManagerClientFactory view_manager_client_factory_;
KeyboardServiceImpl* keyboard_service_;
diff --git a/mojo/examples/media_viewer/media_viewer.cc b/mojo/examples/media_viewer/media_viewer.cc
index 539cbd8..3d9281e 100644
--- a/mojo/examples/media_viewer/media_viewer.cc
+++ b/mojo/examples/media_viewer/media_viewer.cc
@@ -137,7 +137,7 @@ class ControlPanel : public views::ButtonListener {
virtual ~ControlPanel() {}
- void Initialize(view_manager::Node* node) {
+ void Initialize(Node* node) {
const char* kNames[] = { "Zoom In", "Actual Size", "Zoom Out" };
views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView;
@@ -204,9 +204,9 @@ class NavigatorImpl : public InterfaceImpl<navigation::Navigator> {
class MediaViewer
: public ApplicationDelegate,
- public view_manager::ViewManagerDelegate,
+ public ViewManagerDelegate,
public ControlPanel::Delegate,
- public view_manager::NodeObserver,
+ public NodeObserver,
public InterfaceFactoryWithContext<NavigatorImpl, MediaViewer> {
public:
MediaViewer()
@@ -283,7 +283,7 @@ class MediaViewer
}
void LayoutNodes() {
- view_manager::Node* root = content_node_->parent();
+ Node* root = content_node_->parent();
gfx::Rect control_bounds(root->bounds().width(), 28);
control_node_->SetBounds(control_bounds);
gfx::Rect content_bounds(0, control_bounds.height(), root->bounds().width(),
@@ -291,19 +291,18 @@ class MediaViewer
content_node_->SetBounds(content_bounds);
}
- // Overridden from view_manager::ViewManagerDelegate:
- virtual void OnRootAdded(view_manager::ViewManager* view_manager,
- view_manager::Node* root) OVERRIDE {
+ // Overridden from ViewManagerDelegate:
+ virtual void OnRootAdded(ViewManager* view_manager, Node* root) OVERRIDE {
root_node_ = root;
view_manager_ = view_manager;
- control_node_ = view_manager::Node::Create(view_manager_);
+ control_node_ = Node::Create(view_manager_);
root_node_->AddChild(control_node_);
- content_node_ = view_manager::Node::Create(view_manager_);
+ content_node_ = Node::Create(view_manager_);
root_node_->AddChild(content_node_);
- control_node_->SetActiveView(view_manager::View::Create(view_manager_));
+ control_node_->SetActiveView(View::Create(view_manager_));
control_panel_.Initialize(control_node_);
LayoutNodes();
@@ -318,7 +317,7 @@ class MediaViewer
}
}
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();
@@ -342,12 +341,12 @@ class MediaViewer
}
// NodeObserver:
- virtual void OnNodeBoundsChanged(view_manager::Node* node,
+ virtual void OnNodeBoundsChanged(Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) OVERRIDE {
LayoutNodes();
}
- virtual void OnNodeDestroyed(view_manager::Node* node) OVERRIDE {
+ virtual void OnNodeDestroyed(Node* node) OVERRIDE {
DCHECK_EQ(node, root_node_);
node->RemoveObserver(this);
root_node_ = NULL;
@@ -360,11 +359,11 @@ class MediaViewer
ApplicationImpl* app_;
scoped_ptr<ViewsInit> views_init_;
- view_manager::ViewManager* view_manager_;
- view_manager::ViewManagerClientFactory view_manager_client_factory_;
- view_manager::Node* root_node_;
- view_manager::Node* control_node_;
- view_manager::Node* content_node_;
+ ViewManager* view_manager_;
+ ViewManagerClientFactory view_manager_client_factory_;
+ Node* root_node_;
+ Node* control_node_;
+ Node* content_node_;
ControlPanel control_panel_;
ZoomableMediaPtr zoomable_media_;
HandlerMap handler_map_;
diff --git a/mojo/examples/nesting_app/nesting_app.cc b/mojo/examples/nesting_app/nesting_app.cc
index 1b015df..41c17d0f 100644
--- a/mojo/examples/nesting_app/nesting_app.cc
+++ b/mojo/examples/nesting_app/nesting_app.cc
@@ -21,14 +21,6 @@
#include "ui/events/event_constants.h"
#include "url/gurl.h"
-using mojo::view_manager::Node;
-using mojo::view_manager::NodeObserver;
-using mojo::view_manager::View;
-using mojo::view_manager::ViewManager;
-using mojo::view_manager::ViewManagerClientFactory;
-using mojo::view_manager::ViewManagerDelegate;
-using mojo::view_manager::ViewObserver;
-
namespace mojo {
namespace examples {
diff --git a/mojo/examples/png_viewer/png_viewer.cc b/mojo/examples/png_viewer/png_viewer.cc
index e1a5aed..3996713 100644
--- a/mojo/examples/png_viewer/png_viewer.cc
+++ b/mojo/examples/png_viewer/png_viewer.cc
@@ -89,7 +89,7 @@ class NavigatorImpl : public InterfaceImpl<navigation::Navigator> {
delete[] data;
}
- void UpdateView(view_manager::Id node_id, const SkBitmap& bitmap);
+ void UpdateView(Id node_id, const SkBitmap& bitmap);
int GetContentLength(const Array<String>& headers) {
for (size_t i = 0; i < headers.size(); ++i) {
@@ -113,8 +113,8 @@ class NavigatorImpl : public InterfaceImpl<navigation::Navigator> {
class PNGViewer
: public ApplicationDelegate,
- public view_manager::ViewManagerDelegate,
- public view_manager::NodeObserver,
+ public ViewManagerDelegate,
+ public NodeObserver,
public InterfaceFactoryWithContext<NavigatorImpl, PNGViewer>,
public InterfaceFactoryWithContext<ZoomableMediaImpl, PNGViewer> {
public:
@@ -130,7 +130,7 @@ class PNGViewer
root_->RemoveObserver(this);
}
- void UpdateView(view_manager::Id node_id, const SkBitmap& bitmap) {
+ void UpdateView(Id node_id, const SkBitmap& bitmap) {
bitmap_ = bitmap;
zoom_percentage_ = kDefaultZoomPercentage;
DrawBitmap();
@@ -172,19 +172,18 @@ class PNGViewer
return true;
}
- // Overridden from view_manager::ViewManagerDelegate:
- virtual void OnRootAdded(view_manager::ViewManager* view_manager,
- view_manager::Node* root) OVERRIDE {
+ // Overridden from ViewManagerDelegate:
+ virtual void OnRootAdded(ViewManager* view_manager, Node* root) OVERRIDE {
root_ = root;
root_->AddObserver(this);
- content_view_ = view_manager::View::Create(view_manager);
+ content_view_ = View::Create(view_manager);
root_->SetActiveView(content_view_);
content_view_->SetColor(SK_ColorGRAY);
if (!bitmap_.isNull())
DrawBitmap();
}
virtual void OnViewManagerDisconnected(
- view_manager::ViewManager* view_manager) OVERRIDE {
+ ViewManager* view_manager) OVERRIDE {
base::MessageLoop::current()->Quit();
}
@@ -206,23 +205,23 @@ class PNGViewer
}
// NodeObserver:
- virtual void OnNodeBoundsChanged(view_manager::Node* node,
+ virtual void OnNodeBoundsChanged(Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) OVERRIDE {
DCHECK_EQ(node, root_);
DrawBitmap();
}
- virtual void OnNodeDestroyed(view_manager::Node* node) OVERRIDE {
+ virtual void OnNodeDestroyed(Node* node) OVERRIDE {
DCHECK_EQ(node, root_);
node->RemoveObserver(this);
root_ = NULL;
}
- view_manager::View* content_view_;
- view_manager::Node* root_;
+ View* content_view_;
+ Node* root_;
SkBitmap bitmap_;
uint16_t zoom_percentage_;
- view_manager::ViewManagerClientFactory view_manager_client_factory_;
+ ViewManagerClientFactory view_manager_client_factory_;
DISALLOW_COPY_AND_ASSIGN(PNGViewer);
};
@@ -239,7 +238,7 @@ void ZoomableMediaImpl::ZoomToActualSize() {
viewer_->ZoomToActualSize();
}
-void NavigatorImpl::UpdateView(view_manager::Id node_id,
+void NavigatorImpl::UpdateView(Id node_id,
const SkBitmap& bitmap) {
viewer_->UpdateView(node_id, bitmap);
}
diff --git a/mojo/examples/window_manager/debug_panel.cc b/mojo/examples/window_manager/debug_panel.cc
index 814aca5..dfd2b2a 100644
--- a/mojo/examples/window_manager/debug_panel.cc
+++ b/mojo/examples/window_manager/debug_panel.cc
@@ -24,7 +24,7 @@ const int kNavigationTargetGroupId = 1;
} // namespace
-DebugPanel::DebugPanel(Delegate* delegate, view_manager::Node* node)
+DebugPanel::DebugPanel(Delegate* delegate, Node* node)
: delegate_(delegate),
node_(node),
navigation_target_label_(new views::Label(
diff --git a/mojo/examples/window_manager/debug_panel.h b/mojo/examples/window_manager/debug_panel.h
index 532ebce..5e6619b 100644
--- a/mojo/examples/window_manager/debug_panel.h
+++ b/mojo/examples/window_manager/debug_panel.h
@@ -20,9 +20,7 @@ class RadioButton;
namespace mojo {
-namespace view_manager {
class Node;
-}
namespace examples {
@@ -47,7 +45,7 @@ class DebugPanel : public views::LayoutManager, public views::ButtonListener {
virtual ~Delegate(){}
};
- DebugPanel(Delegate* delegate, view_manager::Node* node);
+ DebugPanel(Delegate* delegate, Node* node);
virtual ~DebugPanel();
navigation::Target navigation_target() const;
@@ -62,7 +60,7 @@ class DebugPanel : public views::LayoutManager, public views::ButtonListener {
void Navigate(const std::string& url);
Delegate* delegate_;
- view_manager::Node* node_;
+ Node* node_;
views::Label* navigation_target_label_;
views::RadioButton* navigation_target_new_;
diff --git a/mojo/examples/window_manager/window_manager.cc b/mojo/examples/window_manager/window_manager.cc
index 1f4e597..4ee5fd3 100644
--- a/mojo/examples/window_manager/window_manager.cc
+++ b/mojo/examples/window_manager/window_manager.cc
@@ -32,16 +32,6 @@
#undef CreateWindow
#endif
-using mojo::view_manager::Id;
-using mojo::view_manager::Node;
-using mojo::view_manager::NodeObserver;
-using mojo::view_manager::View;
-using mojo::view_manager::ViewManager;
-using mojo::view_manager::ViewManagerClientFactory;
-using mojo::view_manager::ViewManagerDelegate;
-using mojo::view_manager::ViewObserver;
-using mojo::view_manager::WindowManagerDelegate;
-
namespace mojo {
namespace examples {
@@ -488,9 +478,9 @@ class WindowManager
keyboard_manager_->node()->Contains(target->node());
}
- Id CreateControlPanel(view_manager::Node* root) {
+ Id CreateControlPanel(Node* root) {
Node* node = Node::Create(view_manager_);
- View* view = view_manager::View::Create(view_manager_);
+ View* view = View::Create(view_manager_);
root->AddChild(node);
node->SetActiveView(view);
diff --git a/mojo/examples/wm_flow/app/app.cc b/mojo/examples/wm_flow/app/app.cc
index 0d6b83f..13fac63 100644
--- a/mojo/examples/wm_flow/app/app.cc
+++ b/mojo/examples/wm_flow/app/app.cc
@@ -26,7 +26,7 @@ const SkColor kColors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorYELLOW };
// connection by connecting to the ViewManagerInit service and asking to be
// embed without a node context.
class WMFlowApp : public mojo::ApplicationDelegate,
- public mojo::view_manager::ViewManagerDelegate {
+ public mojo::ViewManagerDelegate {
public:
WMFlowApp() : embed_count_(0), view_manager_client_factory_(this) {}
virtual ~WMFlowApp() {}
@@ -34,7 +34,7 @@ class WMFlowApp : public mojo::ApplicationDelegate,
private:
// Overridden from Application:
virtual void Initialize(mojo::ApplicationImpl* app) MOJO_OVERRIDE {
- mojo::view_manager::ViewManagerInitServicePtr init_svc;
+ mojo::ViewManagerInitServicePtr init_svc;
app->ConnectToService("mojo:mojo_view_manager", &init_svc);
init_svc->Embed("mojo:mojo_wm_flow_app", base::Bind(&ConnectCallback));
init_svc->Embed("mojo:mojo_wm_flow_app", base::Bind(&ConnectCallback));
@@ -48,19 +48,19 @@ class WMFlowApp : public mojo::ApplicationDelegate,
void OnConnect(bool success) {}
- // Overridden from mojo::view_manager::ViewManagerDelegate:
- virtual void OnRootAdded(mojo::view_manager::ViewManager* view_manager,
- mojo::view_manager::Node* root) MOJO_OVERRIDE {
- mojo::view_manager::View* view =
- mojo::view_manager::View::Create(view_manager);
+ // Overridden from mojo::ViewManagerDelegate:
+ virtual void OnRootAdded(mojo::ViewManager* view_manager,
+ mojo::Node* root) MOJO_OVERRIDE {
+ mojo::View* view =
+ mojo::View::Create(view_manager);
root->SetActiveView(view);
view->SetColor(kColors[embed_count_++ % arraysize(kColors)]);
}
virtual void OnViewManagerDisconnected(
- mojo::view_manager::ViewManager* view_manager) MOJO_OVERRIDE {}
+ mojo::ViewManager* view_manager) MOJO_OVERRIDE {}
int embed_count_;
- mojo::view_manager::ViewManagerClientFactory view_manager_client_factory_;
+ mojo::ViewManagerClientFactory view_manager_client_factory_;
DISALLOW_COPY_AND_ASSIGN(WMFlowApp);
};
diff --git a/mojo/examples/wm_flow/init/init.cc b/mojo/examples/wm_flow/init/init.cc
index da54305..b5a225a 100644
--- a/mojo/examples/wm_flow/init/init.cc
+++ b/mojo/examples/wm_flow/init/init.cc
@@ -31,7 +31,7 @@ class WMFlowInit : public mojo::ApplicationDelegate {
void OnConnect(bool success) {}
- mojo::view_manager::ViewManagerInitServicePtr view_manager_init_;
+ mojo::ViewManagerInitServicePtr view_manager_init_;
DISALLOW_COPY_AND_ASSIGN(WMFlowInit);
};
diff --git a/mojo/examples/wm_flow/wm/wm.cc b/mojo/examples/wm_flow/wm/wm.cc
index 197ad0f..6d98b6d 100644
--- a/mojo/examples/wm_flow/wm/wm.cc
+++ b/mojo/examples/wm_flow/wm/wm.cc
@@ -11,8 +11,8 @@
namespace examples {
class SimpleWM : public mojo::ApplicationDelegate,
- public mojo::view_manager::ViewManagerDelegate,
- public mojo::view_manager::WindowManagerDelegate {
+ public mojo::ViewManagerDelegate,
+ public mojo::WindowManagerDelegate {
public:
SimpleWM()
: window_manager_app_(new mojo::WindowManagerApp(this)),
@@ -33,44 +33,44 @@ class SimpleWM : public mojo::ApplicationDelegate,
return true;
}
- // Overridden from mojo::view_manager::ViewManagerDelegate:
+ // Overridden from mojo::ViewManagerDelegate:
virtual void OnRootAdded(
- mojo::view_manager::ViewManager* view_manager,
- mojo::view_manager::Node* root) MOJO_OVERRIDE {
+ mojo::ViewManager* view_manager,
+ mojo::Node* root) MOJO_OVERRIDE {
view_manager_ = view_manager;
root_ = root;
view_manager_->SetWindowManagerDelegate(this);
- window_container_ = mojo::view_manager::Node::Create(view_manager_);
+ window_container_ = mojo::Node::Create(view_manager_);
window_container_->SetBounds(root_->bounds());
root_->AddChild(window_container_);
}
virtual void OnViewManagerDisconnected(
- mojo::view_manager::ViewManager* view_manager) MOJO_OVERRIDE {
+ mojo::ViewManager* view_manager) MOJO_OVERRIDE {
view_manager_ = NULL;
root_ = NULL;
}
- // Overridden from mojo::view_manager::WindowManagerDelegate:
+ // Overridden from mojo::WindowManagerDelegate:
virtual void Embed(const mojo::String& url) MOJO_OVERRIDE {
- mojo::view_manager::Node* embed_node =
- mojo::view_manager::Node::Create(view_manager_);
+ mojo::Node* embed_node =
+ mojo::Node::Create(view_manager_);
embed_node->SetBounds(gfx::Rect(next_window_origin_, gfx::Size(400, 400)));
window_container_->AddChild(embed_node);
embed_node->Embed(url);
next_window_origin_.Offset(50, 50);
}
- virtual void DispatchEvent(mojo::view_manager::View* target,
+ virtual void DispatchEvent(mojo::View* target,
mojo::EventPtr event) MOJO_OVERRIDE {
view_manager_->DispatchEvent(target, event.Pass());
}
scoped_ptr<mojo::WindowManagerApp> window_manager_app_;
- mojo::view_manager::ViewManager* view_manager_;
- mojo::view_manager::Node* root_;
- mojo::view_manager::Node* window_container_;
+ mojo::ViewManager* view_manager_;
+ mojo::Node* root_;
+ mojo::Node* window_container_;
gfx::Point next_window_origin_;
diff --git a/mojo/services/html_viewer/html_document_view.cc b/mojo/services/html_viewer/html_document_view.cc
index e5e318b..f133ad0 100644
--- a/mojo/services/html_viewer/html_document_view.cc
+++ b/mojo/services/html_viewer/html_document_view.cc
@@ -77,9 +77,9 @@ bool CanNavigateLocally(blink::WebFrame* frame,
} // namespace
HTMLDocumentView::HTMLDocumentView(ServiceProvider* service_provider,
- view_manager::ViewManager* view_manager)
+ ViewManager* view_manager)
: view_manager_(view_manager),
- view_(view_manager::View::Create(view_manager_)),
+ view_(View::Create(view_manager_)),
web_view_(NULL),
root_(NULL),
repaint_pending_(false),
@@ -96,7 +96,7 @@ HTMLDocumentView::~HTMLDocumentView() {
root_->RemoveObserver(this);
}
-void HTMLDocumentView::AttachToNode(view_manager::Node* node) {
+void HTMLDocumentView::AttachToNode(Node* node) {
root_ = node;
root_->SetActiveView(view_);
view_->SetColor(SK_ColorCYAN); // Dummy background color.
@@ -185,7 +185,7 @@ void HTMLDocumentView::didNavigateWithinPage(
history_item.urlString().utf8());
}
-void HTMLDocumentView::OnViewInputEvent(view_manager::View* view,
+void HTMLDocumentView::OnViewInputEvent(View* view,
const EventPtr& event) {
scoped_ptr<blink::WebInputEvent> web_event =
TypeConverter<EventPtr, scoped_ptr<blink::WebInputEvent> >::ConvertTo(
@@ -194,14 +194,14 @@ void HTMLDocumentView::OnViewInputEvent(view_manager::View* view,
web_view_->handleInputEvent(*web_event);
}
-void HTMLDocumentView::OnNodeBoundsChanged(view_manager::Node* node,
+void HTMLDocumentView::OnNodeBoundsChanged(Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
DCHECK_EQ(node, root_);
web_view_->resize(node->bounds().size());
}
-void HTMLDocumentView::OnNodeDestroyed(view_manager::Node* node) {
+void HTMLDocumentView::OnNodeDestroyed(Node* node) {
DCHECK_EQ(node, root_);
node->RemoveObserver(this);
root_ = NULL;
diff --git a/mojo/services/html_viewer/html_document_view.h b/mojo/services/html_viewer/html_document_view.h
index 99131a1..41b3c65 100644
--- a/mojo/services/html_viewer/html_document_view.h
+++ b/mojo/services/html_viewer/html_document_view.h
@@ -18,23 +18,21 @@
namespace mojo {
-namespace view_manager {
class Node;
class ViewManager;
class View;
-}
// A view for a single HTML document.
class HTMLDocumentView : public blink::WebViewClient,
public blink::WebFrameClient,
- public view_manager::ViewObserver,
- public view_manager::NodeObserver {
+ public ViewObserver,
+ public NodeObserver {
public:
HTMLDocumentView(ServiceProvider* service_provider,
- view_manager::ViewManager* view_manager);
+ ViewManager* view_manager);
virtual ~HTMLDocumentView();
- void AttachToNode(view_manager::Node* node);
+ void AttachToNode(Node* node);
void Load(URLResponsePtr response);
@@ -63,21 +61,20 @@ class HTMLDocumentView : public blink::WebViewClient,
blink::WebHistoryCommitType commit_type);
// ViewObserver methods:
- virtual void OnViewInputEvent(view_manager::View* view,
- const EventPtr& event) OVERRIDE;
+ virtual void OnViewInputEvent(View* view, const EventPtr& event) OVERRIDE;
// NodeObserver methods:
- virtual void OnNodeBoundsChanged(view_manager::Node* node,
+ virtual void OnNodeBoundsChanged(Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) OVERRIDE;
- virtual void OnNodeDestroyed(view_manager::Node* node) OVERRIDE;
+ virtual void OnNodeDestroyed(Node* node) OVERRIDE;
void Repaint();
- view_manager::ViewManager* view_manager_;
- view_manager::View* view_;
+ ViewManager* view_manager_;
+ View* view_;
blink::WebView* web_view_;
- view_manager::Node* root_;
+ Node* root_;
bool repaint_pending_;
LazyInterfacePtr<navigation::NavigatorHost> navigator_host_;
diff --git a/mojo/services/html_viewer/html_viewer.cc b/mojo/services/html_viewer/html_viewer.cc
index 03fc1e4..9014087 100644
--- a/mojo/services/html_viewer/html_viewer.cc
+++ b/mojo/services/html_viewer/html_viewer.cc
@@ -41,7 +41,7 @@ class NavigatorImpl : public InterfaceImpl<navigation::Navigator> {
class HTMLViewer
: public ApplicationDelegate,
- public view_manager::ViewManagerDelegate,
+ public ViewManagerDelegate,
public InterfaceFactoryWithContext<NavigatorImpl, HTMLViewer> {
public:
HTMLViewer()
@@ -74,9 +74,8 @@ class HTMLViewer
return true;
}
- // Overridden from view_manager::ViewManagerDelegate:
- virtual void OnRootAdded(view_manager::ViewManager* view_manager,
- view_manager::Node* root) OVERRIDE {
+ // Overridden from ViewManagerDelegate:
+ virtual void OnRootAdded(ViewManager* view_manager, Node* root) OVERRIDE {
document_view_ = new HTMLDocumentView(
application_impl_->ConnectToApplication("mojo://mojo_window_manager/")->
GetServiceProvider(),
@@ -84,8 +83,7 @@ class HTMLViewer
document_view_->AttachToNode(root);
MaybeLoad();
}
- virtual void OnViewManagerDisconnected(
- view_manager::ViewManager* view_manager) OVERRIDE {
+ virtual void OnViewManagerDisconnected(ViewManager* view_manager) OVERRIDE {
base::MessageLoop::current()->Quit();
}
@@ -100,7 +98,7 @@ class HTMLViewer
// TODO(darin): Figure out proper ownership of this instance.
HTMLDocumentView* document_view_;
URLResponsePtr response_;
- view_manager::ViewManagerClientFactory view_manager_client_factory_;
+ ViewManagerClientFactory view_manager_client_factory_;
DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
};
diff --git a/mojo/services/public/cpp/view_manager/lib/node.cc b/mojo/services/public/cpp/view_manager/lib/node.cc
index 27556eb..292cf29 100644
--- a/mojo/services/public/cpp/view_manager/lib/node.cc
+++ b/mojo/services/public/cpp/view_manager/lib/node.cc
@@ -11,7 +11,6 @@
#include "mojo/services/public/cpp/view_manager/view.h"
namespace mojo {
-namespace view_manager {
namespace {
@@ -395,5 +394,4 @@ void Node::LocalSetBounds(const gfx::Rect& old_bounds,
bounds_ = new_bounds;
}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/lib/node_observer.cc b/mojo/services/public/cpp/view_manager/lib/node_observer.cc
index 0c96538..1bbf155 100644
--- a/mojo/services/public/cpp/view_manager/lib/node_observer.cc
+++ b/mojo/services/public/cpp/view_manager/lib/node_observer.cc
@@ -7,7 +7,6 @@
#include "base/basictypes.h"
namespace mojo {
-namespace view_manager {
////////////////////////////////////////////////////////////////////////////////
// NodeObserver, public:
@@ -18,5 +17,4 @@ NodeObserver::TreeChangeParams::TreeChangeParams()
new_parent(NULL),
receiver(NULL) {}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/lib/node_private.cc b/mojo/services/public/cpp/view_manager/lib/node_private.cc
index 92dfb53..8bf4bb8 100644
--- a/mojo/services/public/cpp/view_manager/lib/node_private.cc
+++ b/mojo/services/public/cpp/view_manager/lib/node_private.cc
@@ -5,7 +5,6 @@
#include "mojo/services/public/cpp/view_manager/lib/node_private.h"
namespace mojo {
-namespace view_manager {
NodePrivate::NodePrivate(Node* node)
: node_(node) {
@@ -19,5 +18,4 @@ Node* NodePrivate::LocalCreate() {
return new Node;
}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/lib/node_private.h b/mojo/services/public/cpp/view_manager/lib/node_private.h
index 6f634b3..65db923 100644
--- a/mojo/services/public/cpp/view_manager/lib/node_private.h
+++ b/mojo/services/public/cpp/view_manager/lib/node_private.h
@@ -10,7 +10,6 @@
#include "mojo/services/public/cpp/view_manager/node.h"
namespace mojo {
-namespace view_manager {
class NodePrivate {
public:
@@ -56,7 +55,6 @@ class NodePrivate {
DISALLOW_COPY_AND_ASSIGN(NodePrivate);
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_NODE_PRIVATE_H_
diff --git a/mojo/services/public/cpp/view_manager/lib/view.cc b/mojo/services/public/cpp/view_manager/lib/view.cc
index 16cae6f..949a958 100644
--- a/mojo/services/public/cpp/view_manager/lib/view.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view.cc
@@ -11,7 +11,6 @@
#include "ui/gfx/canvas.h"
namespace mojo {
-namespace view_manager {
// static
View* View::Create(ViewManager* manager) {
@@ -71,5 +70,4 @@ void View::LocalDestroy() {
delete this;
}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_client_factory.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_client_factory.cc
index 37d0ee6..9d66d5d 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_client_factory.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_client_factory.cc
@@ -7,7 +7,6 @@
#include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h"
namespace mojo {
-namespace view_manager {
ViewManagerClientFactory::ViewManagerClientFactory(
ViewManagerDelegate* delegate)
@@ -24,5 +23,4 @@ void ViewManagerClientFactory::Create(
BindToRequest(new ViewManagerClientImpl(delegate_), &request);
}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
index c9d634a..a9bb119 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
@@ -20,7 +20,6 @@
#include "ui/gfx/codec/png_codec.h"
namespace mojo {
-namespace view_manager {
Id MakeTransportId(ConnectionSpecificId connection_id,
ConnectionSpecificId local_id) {
@@ -477,5 +476,4 @@ base::Callback<void(ErrorCode)>
base::Unretained(this));
}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
index 7f48e98..51aec4c 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h
@@ -19,8 +19,6 @@ class SkBitmap;
namespace mojo {
class ApplicationConnection;
-namespace view_manager {
-
class ViewManager;
class ViewManagerDelegate;
class ViewManagerTransaction;
@@ -154,7 +152,6 @@ class ViewManagerClientImpl : public ViewManager,
DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl);
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.cc
index 0f4d936..818b04d 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.cc
@@ -11,7 +11,6 @@
#endif
namespace mojo {
-namespace view_manager {
ViewManagerTestSuite::ViewManagerTestSuite(int argc, char** argv)
: TestSuite(argc, argv) {}
@@ -30,5 +29,4 @@ void ViewManagerTestSuite::Initialize() {
gfx::GLSurface::InitializeOneOffForTests();
}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h b/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h
index d0744ad..e073bbd 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h
@@ -8,7 +8,6 @@
#include "base/test/test_suite.h"
namespace mojo {
-namespace view_manager {
class ViewManagerTestSuite : public base::TestSuite {
public:
@@ -22,7 +21,6 @@ class ViewManagerTestSuite : public base::TestSuite {
DISALLOW_COPY_AND_ASSIGN(ViewManagerTestSuite);
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_TEST_SUITE_H_
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_unittests.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_unittests.cc
index 9a83139..9f4f109 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_unittests.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_unittests.cc
@@ -7,7 +7,7 @@
#include "mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h"
int main(int argc, char** argv) {
- mojo::view_manager::ViewManagerTestSuite test_suite(argc, argv);
+ mojo::ViewManagerTestSuite test_suite(argc, argv);
return base::LaunchUnitTests(
argc, argv, base::Bind(&TestSuite::Run, base::Unretained(&test_suite)));
diff --git a/mojo/services/public/cpp/view_manager/lib/view_private.cc b/mojo/services/public/cpp/view_manager/lib/view_private.cc
index 14ecf43..5125c7d 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_private.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_private.cc
@@ -5,7 +5,6 @@
#include "mojo/services/public/cpp/view_manager/lib/view_private.h"
namespace mojo {
-namespace view_manager {
ViewPrivate::ViewPrivate(View* view)
: view_(view) {
@@ -19,5 +18,4 @@ View* ViewPrivate::LocalCreate() {
return new View;
}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/lib/view_private.h b/mojo/services/public/cpp/view_manager/lib/view_private.h
index 2e38613..9be1b24 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_private.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_private.h
@@ -10,7 +10,6 @@
#include "mojo/services/public/cpp/view_manager/view.h"
namespace mojo {
-namespace view_manager {
class ViewPrivate {
public:
@@ -38,7 +37,6 @@ class ViewPrivate {
DISALLOW_COPY_AND_ASSIGN(ViewPrivate);
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_PRIVATE_H_
diff --git a/mojo/services/public/cpp/view_manager/node.h b/mojo/services/public/cpp/view_manager/node.h
index d46083b7..eaeaf15 100644
--- a/mojo/services/public/cpp/view_manager/node.h
+++ b/mojo/services/public/cpp/view_manager/node.h
@@ -15,7 +15,6 @@
#include "ui/gfx/geometry/rect.h"
namespace mojo {
-namespace view_manager {
class View;
class ViewManager;
@@ -106,7 +105,6 @@ class Node {
DISALLOW_COPY_AND_ASSIGN(Node);
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_H_
diff --git a/mojo/services/public/cpp/view_manager/node_observer.h b/mojo/services/public/cpp/view_manager/node_observer.h
index f32325e..d32894c 100644
--- a/mojo/services/public/cpp/view_manager/node_observer.h
+++ b/mojo/services/public/cpp/view_manager/node_observer.h
@@ -16,7 +16,6 @@ class Rect;
}
namespace mojo {
-namespace view_manager {
class Node;
class View;
@@ -74,7 +73,6 @@ class NodeObserver {
virtual ~NodeObserver() {}
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_OBSERVER_H_
diff --git a/mojo/services/public/cpp/view_manager/tests/node_unittest.cc b/mojo/services/public/cpp/view_manager/tests/node_unittest.cc
index 6eaf09a..6bfffd5 100644
--- a/mojo/services/public/cpp/view_manager/tests/node_unittest.cc
+++ b/mojo/services/public/cpp/view_manager/tests/node_unittest.cc
@@ -12,7 +12,6 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
-namespace view_manager {
// Node ------------------------------------------------------------------------
@@ -542,5 +541,4 @@ TEST_F(NodeObserverTest, SetBounds) {
}
}
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
index 59968b5..b39f55d 100644
--- a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
+++ b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
@@ -23,7 +23,6 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
-namespace view_manager {
namespace {
const char kWindowManagerURL[] = "mojo:window_manager";
@@ -782,5 +781,4 @@ TEST_F(ViewManagerTest, Reorder) {
// - focus between nodes unknown to one of the connections.
// - focus between nodes unknown to either connection.
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/public/cpp/view_manager/types.h b/mojo/services/public/cpp/view_manager/types.h
index c1f33f3..9cdcc14 100644
--- a/mojo/services/public/cpp/view_manager/types.h
+++ b/mojo/services/public/cpp/view_manager/types.h
@@ -11,7 +11,6 @@
// file, see it for specifics.
namespace mojo {
-namespace view_manager {
// Used to identify nodes, views and change ids.
typedef uint32_t Id;
@@ -21,7 +20,6 @@ typedef uint32_t Id;
// the connection and the ConnectionSpecificId of the node.
typedef uint16_t ConnectionSpecificId;
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_TYPES_H_
diff --git a/mojo/services/public/cpp/view_manager/util.h b/mojo/services/public/cpp/view_manager/util.h
index 6716075..72c904d 100644
--- a/mojo/services/public/cpp/view_manager/util.h
+++ b/mojo/services/public/cpp/view_manager/util.h
@@ -16,7 +16,6 @@
#endif
namespace mojo {
-namespace view_manager {
inline uint16_t HiWord(uint32_t id) {
return static_cast<uint16_t>((id >> 16) & 0xFFFF);
@@ -26,7 +25,6 @@ inline uint16_t LoWord(uint32_t id) {
return static_cast<uint16_t>(id & 0xFFFF);
}
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_UTIL_H_
diff --git a/mojo/services/public/cpp/view_manager/view.h b/mojo/services/public/cpp/view_manager/view.h
index b10417b..1d70e45 100644
--- a/mojo/services/public/cpp/view_manager/view.h
+++ b/mojo/services/public/cpp/view_manager/view.h
@@ -13,7 +13,6 @@
class SkBitmap;
namespace mojo {
-namespace view_manager {
class Node;
class ViewManager;
@@ -54,7 +53,6 @@ class View {
DISALLOW_COPY_AND_ASSIGN(View);
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_
diff --git a/mojo/services/public/cpp/view_manager/view_manager.h b/mojo/services/public/cpp/view_manager/view_manager.h
index 30331e9..b520d07 100644
--- a/mojo/services/public/cpp/view_manager/view_manager.h
+++ b/mojo/services/public/cpp/view_manager/view_manager.h
@@ -13,8 +13,6 @@
namespace mojo {
class ApplicationConnection;
-namespace view_manager {
-
class Node;
class View;
class ViewManagerDelegate;
@@ -46,7 +44,6 @@ class ViewManager {
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_
diff --git a/mojo/services/public/cpp/view_manager/view_manager_client_factory.h b/mojo/services/public/cpp/view_manager/view_manager_client_factory.h
index db58d32..a0ea9da 100644
--- a/mojo/services/public/cpp/view_manager/view_manager_client_factory.h
+++ b/mojo/services/public/cpp/view_manager/view_manager_client_factory.h
@@ -9,7 +9,6 @@
#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
namespace mojo {
-namespace view_manager {
class ViewManagerDelegate;
@@ -30,7 +29,6 @@ class ViewManagerClientFactory : public InterfaceFactory<ViewManagerClient> {
ViewManagerDelegate* delegate_;
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CLIENT_FACTORY_H_
diff --git a/mojo/services/public/cpp/view_manager/view_manager_delegate.h b/mojo/services/public/cpp/view_manager/view_manager_delegate.h
index d765bda..c05c24c 100644
--- a/mojo/services/public/cpp/view_manager/view_manager_delegate.h
+++ b/mojo/services/public/cpp/view_manager/view_manager_delegate.h
@@ -6,7 +6,6 @@
#define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_DELEGATE_H_
namespace mojo {
-namespace view_manager {
class Node;
class ViewManager;
@@ -20,7 +19,6 @@ class ViewManagerDelegate {
virtual ~ViewManagerDelegate() {}
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_DELEGATE_H_
diff --git a/mojo/services/public/cpp/view_manager/view_observer.h b/mojo/services/public/cpp/view_manager/view_observer.h
index 2eb3111..c83f8c1 100644
--- a/mojo/services/public/cpp/view_manager/view_observer.h
+++ b/mojo/services/public/cpp/view_manager/view_observer.h
@@ -12,7 +12,6 @@
#include "mojo/services/public/interfaces/input_events/input_events.mojom.h"
namespace mojo {
-namespace view_manager {
class View;
@@ -29,7 +28,6 @@ class ViewObserver {
virtual ~ViewObserver() {}
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_OBSERVER_H_
diff --git a/mojo/services/public/cpp/view_manager/window_manager_delegate.h b/mojo/services/public/cpp/view_manager/window_manager_delegate.h
index bbf8feb..41f841c 100644
--- a/mojo/services/public/cpp/view_manager/window_manager_delegate.h
+++ b/mojo/services/public/cpp/view_manager/window_manager_delegate.h
@@ -8,7 +8,6 @@
#include "mojo/services/public/interfaces/input_events/input_events.mojom.h"
namespace mojo {
-namespace view_manager {
class View;
@@ -27,7 +26,6 @@ class WindowManagerDelegate {
virtual ~WindowManagerDelegate() {}
};
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_WINDOW_MANAGER_DELEGATE_H_
diff --git a/mojo/services/public/interfaces/view_manager/view_manager.mojom b/mojo/services/public/interfaces/view_manager/view_manager.mojom
index e9477f8..19e8820 100644
--- a/mojo/services/public/interfaces/view_manager/view_manager.mojom
+++ b/mojo/services/public/interfaces/view_manager/view_manager.mojom
@@ -6,7 +6,7 @@ import "mojo/services/public/interfaces/geometry/geometry.mojom"
import "mojo/services/public/interfaces/input_events/input_events.mojom"
import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojom"
-module mojo.view_manager {
+module mojo {
struct NodeData {
uint32 parent_id;
diff --git a/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom b/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom
index 1bd1190..5d13805 100644
--- a/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom
+++ b/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-module mojo.view_manager {
+module mojo {
enum OrderDirection {
ABOVE = 1,
diff --git a/mojo/services/view_manager/context_factory_impl.cc b/mojo/services/view_manager/context_factory_impl.cc
index 212407b..6772659 100644
--- a/mojo/services/view_manager/context_factory_impl.cc
+++ b/mojo/services/view_manager/context_factory_impl.cc
@@ -14,7 +14,6 @@
#include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
namespace mojo {
-namespace view_manager {
namespace service {
ContextFactoryImpl::ContextFactoryImpl(
@@ -76,5 +75,4 @@ base::MessageLoopProxy* ContextFactoryImpl::GetCompositorMessageLoop() {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/context_factory_impl.h b/mojo/services/view_manager/context_factory_impl.h
index 55950a0..0ef0fe3 100644
--- a/mojo/services/view_manager/context_factory_impl.h
+++ b/mojo/services/view_manager/context_factory_impl.h
@@ -15,7 +15,6 @@ class ContextProviderInProcess;
}
namespace mojo {
-namespace view_manager {
namespace service {
// The default factory that creates in-process contexts.
@@ -53,7 +52,6 @@ class ContextFactoryImpl : public ui::ContextFactory {
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_CONTEXT_FACTORY_IMPL_H_
diff --git a/mojo/services/view_manager/ids.h b/mojo/services/view_manager/ids.h
index 8d906be..593497f 100644
--- a/mojo/services/view_manager/ids.h
+++ b/mojo/services/view_manager/ids.h
@@ -10,7 +10,6 @@
#include "mojo/services/view_manager/view_manager_export.h"
namespace mojo {
-namespace view_manager {
namespace service {
// Connection id reserved for the root.
@@ -88,7 +87,6 @@ inline NodeId InvalidNodeId() {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_IDS_H_
diff --git a/mojo/services/view_manager/main.cc b/mojo/services/view_manager/main.cc
index 2254c76..9f6285f 100644
--- a/mojo/services/view_manager/main.cc
+++ b/mojo/services/view_manager/main.cc
@@ -8,7 +8,6 @@
#include "mojo/services/view_manager/view_manager_init_service_impl.h"
namespace mojo {
-namespace view_manager {
namespace service {
class ViewManagerApp : public ApplicationDelegate,
@@ -40,11 +39,10 @@ class ViewManagerApp : public ApplicationDelegate,
};
} // namespace service
-} // namespace view_manager
// static
ApplicationDelegate* ApplicationDelegate::Create() {
- return new mojo::view_manager::service::ViewManagerApp();
+ return new mojo::service::ViewManagerApp();
}
} // namespace mojo
diff --git a/mojo/services/view_manager/node.cc b/mojo/services/view_manager/node.cc
index 13993bf..65bc946 100644
--- a/mojo/services/view_manager/node.cc
+++ b/mojo/services/view_manager/node.cc
@@ -13,10 +13,9 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/native_widget_types.h"
-DECLARE_WINDOW_PROPERTY_TYPE(mojo::view_manager::service::Node*);
+DECLARE_WINDOW_PROPERTY_TYPE(mojo::service::Node*);
namespace mojo {
-namespace view_manager {
namespace service {
DEFINE_WINDOW_PROPERTY_KEY(Node*, kNodeKey, NULL);
@@ -213,5 +212,4 @@ void Node::OnEvent(ui::Event* event) {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/node.h b/mojo/services/view_manager/node.h
index 8dcbf18..48b66c2 100644
--- a/mojo/services/view_manager/node.h
+++ b/mojo/services/view_manager/node.h
@@ -16,7 +16,6 @@
#include "ui/aura/window_observer.h"
namespace mojo {
-namespace view_manager {
namespace service {
class NodeDelegate;
@@ -113,7 +112,6 @@ class MOJO_VIEW_MANAGER_EXPORT Node
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_NODE_H_
diff --git a/mojo/services/view_manager/node_delegate.h b/mojo/services/view_manager/node_delegate.h
index 1ad2ee7..898c16c2 100644
--- a/mojo/services/view_manager/node_delegate.h
+++ b/mojo/services/view_manager/node_delegate.h
@@ -16,7 +16,6 @@ class Rect;
}
namespace mojo {
-namespace view_manager {
namespace service {
class Node;
@@ -51,7 +50,6 @@ class MOJO_VIEW_MANAGER_EXPORT NodeDelegate {
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_NODE_DELEGATE_H_
diff --git a/mojo/services/view_manager/root_node_manager.cc b/mojo/services/view_manager/root_node_manager.cc
index 4db1a4c..17ad9b7 100644
--- a/mojo/services/view_manager/root_node_manager.cc
+++ b/mojo/services/view_manager/root_node_manager.cc
@@ -14,7 +14,6 @@
#include "ui/aura/env.h"
namespace mojo {
-namespace view_manager {
namespace service {
RootNodeManager::ScopedChange::ScopedChange(
@@ -300,5 +299,4 @@ void RootNodeManager::OnViewInputEvent(const View* view,
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/root_node_manager.h b/mojo/services/view_manager/root_node_manager.h
index 8266780e..c785c2d 100644
--- a/mojo/services/view_manager/root_node_manager.h
+++ b/mojo/services/view_manager/root_node_manager.h
@@ -25,7 +25,6 @@ namespace mojo {
class ApplicationConnection;
-namespace view_manager {
namespace service {
class RootViewManagerDelegate;
@@ -222,7 +221,6 @@ class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_NODE_MANAGER_H_
diff --git a/mojo/services/view_manager/root_view_manager.cc b/mojo/services/view_manager/root_view_manager.cc
index 8b70cd8..2156c44 100644
--- a/mojo/services/view_manager/root_view_manager.cc
+++ b/mojo/services/view_manager/root_view_manager.cc
@@ -19,7 +19,6 @@
#include "ui/aura/window_observer.h"
namespace mojo {
-namespace view_manager {
namespace service {
// TODO(sky): revisit this, we may need a more sophisticated FocusClient
@@ -166,5 +165,4 @@ void RootViewManager::OnCompositorCreated() {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/root_view_manager.h b/mojo/services/view_manager/root_view_manager.h
index 5215de9..8656d47 100644
--- a/mojo/services/view_manager/root_view_manager.h
+++ b/mojo/services/view_manager/root_view_manager.h
@@ -29,7 +29,6 @@ namespace mojo {
class ApplicationConnection;
-namespace view_manager {
namespace service {
class RootNodeManager;
@@ -68,7 +67,6 @@ class MOJO_VIEW_MANAGER_EXPORT RootViewManager {
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_
diff --git a/mojo/services/view_manager/root_view_manager_delegate.h b/mojo/services/view_manager/root_view_manager_delegate.h
index 2920f51..3a82697 100644
--- a/mojo/services/view_manager/root_view_manager_delegate.h
+++ b/mojo/services/view_manager/root_view_manager_delegate.h
@@ -8,7 +8,6 @@
#include "mojo/services/view_manager/view_manager_export.h"
namespace mojo {
-namespace view_manager {
namespace service {
class MOJO_VIEW_MANAGER_EXPORT RootViewManagerDelegate {
@@ -21,7 +20,6 @@ class MOJO_VIEW_MANAGER_EXPORT RootViewManagerDelegate {
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_
diff --git a/mojo/services/view_manager/screen_impl.cc b/mojo/services/view_manager/screen_impl.cc
index 6339626..39bd91e 100644
--- a/mojo/services/view_manager/screen_impl.cc
+++ b/mojo/services/view_manager/screen_impl.cc
@@ -8,7 +8,6 @@
#include "ui/gfx/rect_conversions.h"
namespace mojo {
-namespace view_manager {
namespace service {
// static
@@ -76,5 +75,4 @@ ScreenImpl::ScreenImpl(const gfx::Rect& screen_bounds) {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/screen_impl.h b/mojo/services/view_manager/screen_impl.h
index 08a6b04..79a6454 100644
--- a/mojo/services/view_manager/screen_impl.h
+++ b/mojo/services/view_manager/screen_impl.h
@@ -15,7 +15,6 @@ class Transform;
}
namespace mojo {
-namespace view_manager {
namespace service {
// A minimal implementation of gfx::Screen for the view manager.
@@ -52,7 +51,6 @@ class ScreenImpl : public gfx::Screen {
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_
diff --git a/mojo/services/view_manager/test_change_tracker.cc b/mojo/services/view_manager/test_change_tracker.cc
index baf4236..6bba79c 100644
--- a/mojo/services/view_manager/test_change_tracker.cc
+++ b/mojo/services/view_manager/test_change_tracker.cc
@@ -11,7 +11,6 @@
#include "mojo/services/public/cpp/view_manager/util.h"
namespace mojo {
-namespace view_manager {
namespace service {
std::string NodeIdToString(Id id) {
@@ -246,5 +245,4 @@ std::string TestNode::ToString() const {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/test_change_tracker.h b/mojo/services/view_manager/test_change_tracker.h
index b122315..01a8572 100644
--- a/mojo/services/view_manager/test_change_tracker.h
+++ b/mojo/services/view_manager/test_change_tracker.h
@@ -14,7 +14,6 @@
#include "ui/gfx/rect.h"
namespace mojo {
-namespace view_manager {
namespace service {
enum ChangeType {
@@ -125,7 +124,6 @@ class TestChangeTracker {
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_TEST_CHANGE_TRACKER_H_
diff --git a/mojo/services/view_manager/view.cc b/mojo/services/view_manager/view.cc
index c33f5f8..08f81a9 100644
--- a/mojo/services/view_manager/view.cc
+++ b/mojo/services/view_manager/view.cc
@@ -7,7 +7,6 @@
#include "mojo/services/view_manager/node.h"
namespace mojo {
-namespace view_manager {
namespace service {
View::View(const ViewId& id) : id_(id), node_(NULL) {}
@@ -24,5 +23,4 @@ void View::SetBitmap(const SkBitmap& bitmap) {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/view.h b/mojo/services/view_manager/view.h
index c4b0c052..5680a5b 100644
--- a/mojo/services/view_manager/view.h
+++ b/mojo/services/view_manager/view.h
@@ -13,7 +13,6 @@
#include "third_party/skia/include/core/SkBitmap.h"
namespace mojo {
-namespace view_manager {
namespace service {
class Node;
@@ -44,7 +43,6 @@ class MOJO_VIEW_MANAGER_EXPORT View {
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_H_
diff --git a/mojo/services/view_manager/view_manager_init_service_context.cc b/mojo/services/view_manager/view_manager_init_service_context.cc
index d0a6fdc..66c8aa9 100644
--- a/mojo/services/view_manager/view_manager_init_service_context.cc
+++ b/mojo/services/view_manager/view_manager_init_service_context.cc
@@ -9,7 +9,6 @@
#include "mojo/services/view_manager/view_manager_init_service_impl.h"
namespace mojo {
-namespace view_manager {
namespace service {
ViewManagerInitServiceContext::ViewManagerInitServiceContext()
@@ -65,5 +64,4 @@ void ViewManagerInitServiceContext::OnRootViewManagerWindowTreeHostCreated() {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/view_manager_init_service_context.h b/mojo/services/view_manager/view_manager_init_service_context.h
index 3206205..3e02069 100644
--- a/mojo/services/view_manager/view_manager_init_service_context.h
+++ b/mojo/services/view_manager/view_manager_init_service_context.h
@@ -14,7 +14,6 @@
#include "mojo/services/view_manager/view_manager_export.h"
namespace mojo {
-namespace view_manager {
namespace service {
class RootNodeManager;
@@ -53,7 +52,6 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerInitServiceContext
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_CONTEXT_H_
diff --git a/mojo/services/view_manager/view_manager_init_service_impl.cc b/mojo/services/view_manager/view_manager_init_service_impl.cc
index e375439..3f9479d 100644
--- a/mojo/services/view_manager/view_manager_init_service_impl.cc
+++ b/mojo/services/view_manager/view_manager_init_service_impl.cc
@@ -12,7 +12,6 @@
namespace mojo {
class ApplicationConnection;
-namespace view_manager {
namespace service {
ViewManagerInitServiceImpl::ConnectParams::ConnectParams() {}
@@ -64,5 +63,4 @@ void ViewManagerInitServiceImpl::Embed(
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/view_manager_init_service_impl.h b/mojo/services/view_manager/view_manager_init_service_impl.h
index a10af10..33d3cea 100644
--- a/mojo/services/view_manager/view_manager_init_service_impl.h
+++ b/mojo/services/view_manager/view_manager_init_service_impl.h
@@ -19,7 +19,6 @@ namespace mojo {
class ApplicationConnection;
class ServiceProvider;
-namespace view_manager {
namespace service {
class ViewManagerInitServiceContext;
@@ -77,7 +76,6 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerInitServiceImpl
#endif
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_
diff --git a/mojo/services/view_manager/view_manager_service_impl.cc b/mojo/services/view_manager/view_manager_service_impl.cc
index 1f169b9..d7353bb 100644
--- a/mojo/services/view_manager/view_manager_service_impl.cc
+++ b/mojo/services/view_manager/view_manager_service_impl.cc
@@ -15,7 +15,6 @@
#include "ui/gfx/codec/png_codec.h"
namespace mojo {
-namespace view_manager {
namespace service {
ViewManagerServiceImpl::ViewManagerServiceImpl(
@@ -855,5 +854,4 @@ void ViewManagerServiceImpl::OnConnectionEstablished() {
}
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/view_manager_service_impl.h b/mojo/services/view_manager/view_manager_service_impl.h
index 568aab8..4f1f418 100644
--- a/mojo/services/view_manager/view_manager_service_impl.h
+++ b/mojo/services/view_manager/view_manager_service_impl.h
@@ -21,7 +21,6 @@ class Rect;
}
namespace mojo {
-namespace view_manager {
namespace service {
class Node;
@@ -269,7 +268,6 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerServiceImpl
#endif
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_SERVICE_IMPL_H_
diff --git a/mojo/services/view_manager/view_manager_unittest.cc b/mojo/services/view_manager/view_manager_unittest.cc
index 5617d6f..6847e13 100644
--- a/mojo/services/view_manager/view_manager_unittest.cc
+++ b/mojo/services/view_manager/view_manager_unittest.cc
@@ -31,7 +31,6 @@
#include "ui/gfx/geometry/rect.h"
namespace mojo {
-namespace view_manager {
namespace service {
namespace {
@@ -1546,5 +1545,4 @@ TEST_F(ViewManagerTest, EmbedWithSameNodeId2) {
// - focus between nodes unknown to either connection.
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/window_tree_host_impl.cc b/mojo/services/view_manager/window_tree_host_impl.cc
index 75e780c..e2d6747 100644
--- a/mojo/services/view_manager/window_tree_host_impl.cc
+++ b/mojo/services/view_manager/window_tree_host_impl.cc
@@ -19,7 +19,6 @@
#include "ui/gfx/geometry/rect.h"
namespace mojo {
-namespace view_manager {
namespace service {
// TODO(sky): nuke this. It shouldn't be static.
@@ -194,5 +193,4 @@ void WindowTreeHostImpl::OnEvent(EventPtr event,
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
diff --git a/mojo/services/view_manager/window_tree_host_impl.h b/mojo/services/view_manager/window_tree_host_impl.h
index 2f293fa..bbbd4b1 100644
--- a/mojo/services/view_manager/window_tree_host_impl.h
+++ b/mojo/services/view_manager/window_tree_host_impl.h
@@ -16,7 +16,6 @@ class ContextFactory;
}
namespace mojo {
-namespace view_manager {
namespace service {
class ContextFactoryImpl;
@@ -72,7 +71,6 @@ class WindowTreeHostImpl : public aura::WindowTreeHost,
};
} // namespace service
-} // namespace view_manager
} // namespace mojo
#endif // MOJO_AURA_WINDOW_TREE_HOST_MOJO_H_
diff --git a/mojo/services/window_manager/window_manager_api_unittest.cc b/mojo/services/window_manager/window_manager_api_unittest.cc
index bb2df34..4a31b2e 100644
--- a/mojo/services/window_manager/window_manager_api_unittest.cc
+++ b/mojo/services/window_manager/window_manager_api_unittest.cc
@@ -33,7 +33,7 @@ void ResultCallback(bool* result_cache, base::RunLoop* run_loop, bool result) {
// Responsible for establishing the initial ViewManagerService connection.
// Blocks until result is determined.
-bool InitEmbed(view_manager::ViewManagerInitService* view_manager_init,
+bool InitEmbed(ViewManagerInitService* view_manager_init,
const std::string& url) {
bool result = false;
base::RunLoop run_loop;
@@ -43,26 +43,26 @@ bool InitEmbed(view_manager::ViewManagerInitService* view_manager_init,
return result;
}
-void OpenWindowCallback(view_manager::Id* id,
+void OpenWindowCallback(Id* id,
base::RunLoop* run_loop,
- view_manager::Id window_id) {
+ Id window_id) {
*id = window_id;
run_loop->Quit();
}
-view_manager::Id OpenWindow(WindowManagerService* window_manager) {
+Id OpenWindow(WindowManagerService* window_manager) {
base::RunLoop run_loop;
- view_manager::Id id;
+ Id id;
window_manager->OpenWindow(
base::Bind(&OpenWindowCallback, &id, &run_loop));
run_loop.Run();
return id;
}
-view_manager::Id OpenWindowWithURL(WindowManagerService* window_manager,
+Id OpenWindowWithURL(WindowManagerService* window_manager,
const std::string& url) {
base::RunLoop run_loop;
- view_manager::Id id;
+ Id id;
window_manager->OpenWindowWithURL(
url,
base::Bind(&OpenWindowCallback, &id, &run_loop));
@@ -72,7 +72,7 @@ view_manager::Id OpenWindowWithURL(WindowManagerService* window_manager,
class TestWindowManagerClient : public WindowManagerClient {
public:
- typedef base::Callback<void(view_manager::Id, view_manager::Id)>
+ typedef base::Callback<void(Id, Id)>
TwoNodeCallback;
explicit TestWindowManagerClient(base::RunLoop* run_loop)
@@ -92,18 +92,18 @@ class TestWindowManagerClient : public WindowManagerClient {
run_loop_->Quit();
}
virtual void OnCaptureChanged(
- view_manager::Id old_capture_node_id,
- view_manager::Id new_capture_node_id) MOJO_OVERRIDE {
+ Id old_capture_node_id,
+ Id new_capture_node_id) MOJO_OVERRIDE {
}
virtual void OnFocusChanged(
- view_manager::Id old_focused_node_id,
- view_manager::Id new_focused_node_id) MOJO_OVERRIDE {
+ Id old_focused_node_id,
+ Id new_focused_node_id) MOJO_OVERRIDE {
if (!focus_changed_callback_.is_null())
focus_changed_callback_.Run(old_focused_node_id, new_focused_node_id);
}
virtual void OnActiveWindowChanged(
- view_manager::Id old_active_window,
- view_manager::Id new_active_window) MOJO_OVERRIDE {
+ Id old_active_window,
+ Id new_active_window) MOJO_OVERRIDE {
if (!active_window_changed_callback_.is_null())
active_window_changed_callback_.Run(old_active_window, new_active_window);
}
@@ -117,9 +117,9 @@ class TestWindowManagerClient : public WindowManagerClient {
class TestServiceLoader : public ServiceLoader,
public ApplicationDelegate,
- public view_manager::ViewManagerDelegate {
+ public ViewManagerDelegate {
public:
- typedef base::Callback<void(view_manager::Node*)> RootAddedCallback;
+ typedef base::Callback<void(Node*)> RootAddedCallback;
explicit TestServiceLoader(const RootAddedCallback& root_added_callback)
: root_added_callback_(root_added_callback),
@@ -147,18 +147,18 @@ class TestServiceLoader : public ServiceLoader,
}
// Overridden from ViewManagerDelegate:
- virtual void OnRootAdded(view_manager::ViewManager* view_manager,
- view_manager::Node* root) MOJO_OVERRIDE {
+ virtual void OnRootAdded(ViewManager* view_manager,
+ Node* root) MOJO_OVERRIDE {
root_added_callback_.Run(root);
}
virtual void OnViewManagerDisconnected(
- view_manager::ViewManager* view_manager) MOJO_OVERRIDE {
+ ViewManager* view_manager) MOJO_OVERRIDE {
}
RootAddedCallback root_added_callback_;
ScopedVector<ApplicationImpl> apps_;
- view_manager::ViewManagerClientFactory view_manager_client_factory_;
+ ViewManagerClientFactory view_manager_client_factory_;
DISALLOW_COPY_AND_ASSIGN(TestServiceLoader);
};
@@ -171,10 +171,10 @@ class WindowManagerApiTest : public testing::Test {
virtual ~WindowManagerApiTest() {}
protected:
- typedef std::pair<view_manager::Id, view_manager::Id> TwoIds;
+ typedef std::pair<Id, Id> TwoIds;
- view_manager::Id WaitForEmbed() {
- view_manager::Id id;
+ Id WaitForEmbed() {
+ Id id;
base::RunLoop run_loop;
root_added_callback_ = base::Bind(&WindowManagerApiTest::OnEmbed,
base::Unretained(this), &id, &run_loop);
@@ -236,22 +236,22 @@ class WindowManagerApiTest : public testing::Test {
connect_loop.Run();
}
- void OnRootAdded(view_manager::Node* root) {
+ void OnRootAdded(Node* root) {
if (!root_added_callback_.is_null())
root_added_callback_.Run(root);
}
- void OnEmbed(view_manager::Id* root_id,
+ void OnEmbed(Id* root_id,
base::RunLoop* loop,
- view_manager::Node* root) {
+ Node* root) {
*root_id = root->id();
loop->Quit();
}
void OnFocusChanged(TwoIds* old_and_new,
base::RunLoop* run_loop,
- view_manager::Id old_focused_node_id,
- view_manager::Id new_focused_node_id) {
+ Id old_focused_node_id,
+ Id new_focused_node_id) {
DCHECK(old_and_new);
old_and_new->first = old_focused_node_id;
old_and_new->second = new_focused_node_id;
@@ -260,8 +260,8 @@ class WindowManagerApiTest : public testing::Test {
void OnActiveWindowChanged(TwoIds* old_and_new,
base::RunLoop* run_loop,
- view_manager::Id old_focused_node_id,
- view_manager::Id new_focused_node_id) {
+ Id old_focused_node_id,
+ Id new_focused_node_id) {
DCHECK(old_and_new);
old_and_new->first = old_focused_node_id;
old_and_new->second = new_focused_node_id;
@@ -270,7 +270,7 @@ class WindowManagerApiTest : public testing::Test {
shell::ShellTestHelper test_helper_;
base::MessageLoop loop_;
- view_manager::ViewManagerInitServicePtr view_manager_init_;
+ ViewManagerInitServicePtr view_manager_init_;
scoped_ptr<TestWindowManagerClient> window_manager_client_;
TestServiceLoader::RootAddedCallback root_added_callback_;
@@ -280,22 +280,22 @@ class WindowManagerApiTest : public testing::Test {
// http://crbug.com/396295
TEST_F(WindowManagerApiTest, DISABLED_OpenWindow) {
OpenWindow(window_manager_.get());
- view_manager::Id created_node =
+ Id created_node =
OpenWindowWithURL(window_manager_.get(), kTestServiceURL);
- view_manager::Id embed_node = WaitForEmbed();
+ Id embed_node = WaitForEmbed();
EXPECT_EQ(created_node, embed_node);
}
// http://crbug.com/396295
TEST_F(WindowManagerApiTest, DISABLED_FocusAndActivateWindow) {
- view_manager::Id first_window = OpenWindow(window_manager_.get());
+ Id first_window = OpenWindow(window_manager_.get());
window_manager_->FocusWindow(first_window,
base::Bind(&EmptyResultCallback));
TwoIds ids = WaitForFocusChange();
EXPECT_TRUE(ids.first == 0);
EXPECT_EQ(ids.second, first_window);
- view_manager::Id second_window = OpenWindow(window_manager_.get());
+ Id second_window = OpenWindow(window_manager_.get());
window_manager_->ActivateWindow(second_window,
base::Bind(&EmptyResultCallback));
ids = WaitForActiveWindowChange();
diff --git a/mojo/services/window_manager/window_manager_app.cc b/mojo/services/window_manager/window_manager_app.cc
index ccc3898..42c9e03 100644
--- a/mojo/services/window_manager/window_manager_app.cc
+++ b/mojo/services/window_manager/window_manager_app.cc
@@ -18,14 +18,14 @@
#include "ui/wm/core/focus_rules.h"
#include "ui/wm/public/activation_client.h"
-DECLARE_WINDOW_PROPERTY_TYPE(mojo::view_manager::Node*);
+DECLARE_WINDOW_PROPERTY_TYPE(mojo::Node*);
namespace mojo {
namespace {
-DEFINE_WINDOW_PROPERTY_KEY(view_manager::Node*, kNodeKey, NULL);
+DEFINE_WINDOW_PROPERTY_KEY(Node*, kNodeKey, NULL);
-view_manager::Id GetIdForWindow(aura::Window* window) {
+Id GetIdForWindow(aura::Window* window) {
return window ? window->GetProperty(kNodeKey)->id() : 0;
}
@@ -70,7 +70,7 @@ class WMFocusRules : public wm::FocusRules {
////////////////////////////////////////////////////////////////////////////////
// WindowManagerApp, public:
-WindowManagerApp::WindowManagerApp(view_manager::ViewManagerDelegate* delegate)
+WindowManagerApp::WindowManagerApp(ViewManagerDelegate* delegate)
: InterfaceFactoryWithContext(this),
wrapped_delegate_(delegate),
view_manager_(NULL),
@@ -98,32 +98,32 @@ void WindowManagerApp::RemoveConnection(WindowManagerServiceImpl* connection) {
connections_.erase(connection);
}
-view_manager::Id WindowManagerApp::OpenWindow() {
- view_manager::Node* node = view_manager::Node::Create(view_manager_);
+Id WindowManagerApp::OpenWindow() {
+ Node* node = Node::Create(view_manager_);
root_->AddChild(node);
return node->id();
}
-view_manager::Id WindowManagerApp::OpenWindowWithURL(const String& url) {
- view_manager::Node* node = view_manager::Node::Create(view_manager_);
+Id WindowManagerApp::OpenWindowWithURL(const String& url) {
+ Node* node = Node::Create(view_manager_);
root_->AddChild(node);
node->Embed(url);
return node->id();
}
-void WindowManagerApp::SetCapture(view_manager::Id node) {
+void WindowManagerApp::SetCapture(Id node) {
capture_client_->capture_client()->SetCapture(GetWindowForNodeId(node));
// TODO(beng): notify connected clients that capture has changed, probably
// by implementing some capture-client observer.
}
-void WindowManagerApp::FocusWindow(view_manager::Id node) {
+void WindowManagerApp::FocusWindow(Id node) {
aura::Window* window = GetWindowForNodeId(node);
DCHECK(window);
focus_client_->FocusWindow(window);
}
-void WindowManagerApp::ActivateWindow(view_manager::Id node) {
+void WindowManagerApp::ActivateWindow(Id node) {
aura::Window* window = GetWindowForNodeId(node);
DCHECK(window);
activation_client_->ActivateWindow(window);
@@ -148,10 +148,10 @@ bool WindowManagerApp::ConfigureIncomingConnection(
}
////////////////////////////////////////////////////////////////////////////////
-// WindowManagerApp, view_manager::ViewManagerDelegate implementation:
+// WindowManagerApp, ViewManagerDelegate implementation:
-void WindowManagerApp::OnRootAdded(view_manager::ViewManager* view_manager,
- view_manager::Node* root) {
+void WindowManagerApp::OnRootAdded(ViewManager* view_manager,
+ Node* root) {
DCHECK(!view_manager_ && !root_);
view_manager_ = view_manager;
root_ = root;
@@ -180,7 +180,7 @@ void WindowManagerApp::OnRootAdded(view_manager::ViewManager* view_manager,
}
void WindowManagerApp::OnViewManagerDisconnected(
- view_manager::ViewManager* view_manager) {
+ ViewManager* view_manager) {
DCHECK_EQ(view_manager_, view_manager);
wrapped_delegate_->OnViewManagerDisconnected(view_manager);
root_->RemoveObserver(this);
@@ -190,10 +190,10 @@ void WindowManagerApp::OnViewManagerDisconnected(
}
////////////////////////////////////////////////////////////////////////////////
-// WindowManagerApp, view_manager::NodeObserver implementation:
+// WindowManagerApp, NodeObserver implementation:
void WindowManagerApp::OnTreeChanged(
- const view_manager::NodeObserver::TreeChangeParams& params) {
+ const NodeObserver::TreeChangeParams& params) {
DCHECK_EQ(params.receiver, root_);
DCHECK(params.old_parent || params.new_parent);
if (!params.target)
@@ -248,31 +248,31 @@ void WindowManagerApp::OnWindowActivated(aura::Window* gained_active,
// WindowManagerApp, private:
aura::Window* WindowManagerApp::GetWindowForNodeId(
- view_manager::Id node) const {
+ Id node) const {
NodeIdToWindowMap::const_iterator it = node_id_to_window_map_.find(node);
return it != node_id_to_window_map_.end() ? it->second : NULL;
}
-void WindowManagerApp::RegisterSubtree(view_manager::Id id,
+void WindowManagerApp::RegisterSubtree(Id id,
aura::Window* parent) {
- view_manager::Node* node = view_manager_->GetNodeById(id);
+ Node* node = view_manager_->GetNodeById(id);
DCHECK(node_id_to_window_map_.find(id) == node_id_to_window_map_.end());
aura::Window* window = new aura::Window(NULL);
window->SetProperty(kNodeKey, node);
parent->AddChild(window);
node_id_to_window_map_[id] = window;
- view_manager::Node::Children::const_iterator it = node->children().begin();
+ Node::Children::const_iterator it = node->children().begin();
for (; it != node->children().end(); ++it)
RegisterSubtree((*it)->id(), window);
}
-void WindowManagerApp::UnregisterSubtree(view_manager::Id id) {
- view_manager::Node* node = view_manager_->GetNodeById(id);
+void WindowManagerApp::UnregisterSubtree(Id id) {
+ Node* node = view_manager_->GetNodeById(id);
NodeIdToWindowMap::iterator it = node_id_to_window_map_.find(id);
DCHECK(it != node_id_to_window_map_.end());
scoped_ptr<aura::Window> window(it->second);
node_id_to_window_map_.erase(it);
- view_manager::Node::Children::const_iterator child = node->children().begin();
+ Node::Children::const_iterator child = node->children().begin();
for (; child != node->children().end(); ++child)
UnregisterSubtree((*child)->id());
}
diff --git a/mojo/services/window_manager/window_manager_app.h b/mojo/services/window_manager/window_manager_app.h
index 310dbcc..1664393 100644
--- a/mojo/services/window_manager/window_manager_app.h
+++ b/mojo/services/window_manager/window_manager_app.h
@@ -40,25 +40,25 @@ class WindowTreeHostMojo;
class WindowManagerApp
: public ApplicationDelegate,
- public view_manager::ViewManagerDelegate,
- public view_manager::NodeObserver,
+ public ViewManagerDelegate,
+ public NodeObserver,
public WindowTreeHostMojoDelegate,
public aura::client::FocusChangeObserver,
public aura::client::ActivationChangeObserver,
public InterfaceFactoryWithContext<WindowManagerServiceImpl,
WindowManagerApp> {
public:
- explicit WindowManagerApp(view_manager::ViewManagerDelegate* delegate);
+ explicit WindowManagerApp(ViewManagerDelegate* delegate);
virtual ~WindowManagerApp();
void AddConnection(WindowManagerServiceImpl* connection);
void RemoveConnection(WindowManagerServiceImpl* connection);
- view_manager::Id OpenWindow();
- view_manager::Id OpenWindowWithURL(const String& url);
- void SetCapture(view_manager::Id node);
- void FocusWindow(view_manager::Id node);
- void ActivateWindow(view_manager::Id node);
+ Id OpenWindow();
+ Id OpenWindowWithURL(const String& url);
+ void SetCapture(Id node);
+ void FocusWindow(Id node);
+ void ActivateWindow(Id node);
bool IsReady() const;
@@ -69,17 +69,17 @@ class WindowManagerApp
private:
typedef std::set<WindowManagerServiceImpl*> Connections;
- typedef std::map<view_manager::Id, aura::Window*> NodeIdToWindowMap;
+ typedef std::map<Id, aura::Window*> NodeIdToWindowMap;
- // Overridden from view_manager::ViewManagerDelegate:
- virtual void OnRootAdded(view_manager::ViewManager* view_manager,
- view_manager::Node* root) MOJO_OVERRIDE;
+ // Overridden from ViewManagerDelegate:
+ virtual void OnRootAdded(ViewManager* view_manager,
+ Node* root) MOJO_OVERRIDE;
virtual void OnViewManagerDisconnected(
- view_manager::ViewManager* view_manager) MOJO_OVERRIDE;
+ ViewManager* view_manager) MOJO_OVERRIDE;
- // Overridden from view_manager::NodeObserver:
+ // Overridden from NodeObserver:
virtual void OnTreeChanged(
- const view_manager::NodeObserver::TreeChangeParams& params) MOJO_OVERRIDE;
+ const NodeObserver::TreeChangeParams& params) MOJO_OVERRIDE;
// Overridden from WindowTreeHostMojoDelegate:
virtual void CompositorContentsChanged(const SkBitmap& bitmap) MOJO_OVERRIDE;
@@ -92,22 +92,22 @@ class WindowManagerApp
virtual void OnWindowActivated(aura::Window* gained_active,
aura::Window* lost_active) MOJO_OVERRIDE;
- aura::Window* GetWindowForNodeId(view_manager::Id node) const;
+ aura::Window* GetWindowForNodeId(Id node) const;
// Creates an aura::Window for every node in the hierarchy beneath |id|,
// and adds to the registry so that it can be retrieved later via
// GetWindowForNodeId().
// TODO(beng): perhaps Node should have a property bag.
- void RegisterSubtree(view_manager::Id id, aura::Window* parent);
+ void RegisterSubtree(Id id, aura::Window* parent);
// Deletes the aura::Windows associated with the hierarchy beneath |id|,
// and removes from the registry.
- void UnregisterSubtree(view_manager::Id id);
+ void UnregisterSubtree(Id id);
- view_manager::ViewManagerDelegate* wrapped_delegate_;
+ ViewManagerDelegate* wrapped_delegate_;
- 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_;
scoped_ptr<AuraInit> aura_init_;
scoped_ptr<WindowTreeHostMojo> window_tree_host_;
diff --git a/mojo/services/window_manager/window_manager_service_impl.cc b/mojo/services/window_manager/window_manager_service_impl.cc
index ef1ff64..408bb58 100644
--- a/mojo/services/window_manager/window_manager_service_impl.cc
+++ b/mojo/services/window_manager/window_manager_service_impl.cc
@@ -25,15 +25,13 @@ void WindowManagerServiceImpl::NotifyReady() {
client()->OnWindowManagerReady();
}
-void WindowManagerServiceImpl::NotifyNodeFocused(
- view_manager::Id new_focused_id,
- view_manager::Id old_focused_id) {
+void WindowManagerServiceImpl::NotifyNodeFocused(Id new_focused_id,
+ Id old_focused_id) {
client()->OnFocusChanged(old_focused_id, new_focused_id);
}
-void WindowManagerServiceImpl::NotifyWindowActivated(
- view_manager::Id new_active_id,
- view_manager::Id old_active_id) {
+void WindowManagerServiceImpl::NotifyWindowActivated(Id new_active_id,
+ Id old_active_id) {
client()->OnActiveWindowChanged(old_active_id, new_active_id);
}
@@ -41,10 +39,10 @@ void WindowManagerServiceImpl::NotifyWindowActivated(
// WindowManagerServiceImpl, WindowManager implementation:
void WindowManagerServiceImpl::OpenWindow(
- const Callback<void(view_manager::Id)>& callback) {
+ const Callback<void(Id)>& callback) {
bool success = window_manager_->IsReady();
if (success) {
- view_manager::Id id = window_manager_->OpenWindow();
+ Id id = window_manager_->OpenWindow();
callback.Run(id);
} else {
// TODO(beng): perhaps should take an error code for this.
@@ -54,10 +52,10 @@ void WindowManagerServiceImpl::OpenWindow(
void WindowManagerServiceImpl::OpenWindowWithURL(
const String& url,
- const Callback<void(view_manager::Id)>& callback) {
+ const Callback<void(Id)>& callback) {
bool success = window_manager_->IsReady();
if (success) {
- view_manager::Id id = window_manager_->OpenWindowWithURL(url);
+ Id id = window_manager_->OpenWindowWithURL(url);
callback.Run(id);
} else {
// TODO(beng): perhaps should take an error code for this.
@@ -66,7 +64,7 @@ void WindowManagerServiceImpl::OpenWindowWithURL(
}
void WindowManagerServiceImpl::SetCapture(
- view_manager::Id node,
+ Id node,
const Callback<void(bool)>& callback) {
bool success = window_manager_->IsReady();
if (success)
@@ -75,7 +73,7 @@ void WindowManagerServiceImpl::SetCapture(
}
void WindowManagerServiceImpl::FocusWindow(
- view_manager::Id node,
+ Id node,
const Callback<void(bool)>& callback) {
bool success = window_manager_->IsReady();
if (success)
@@ -84,7 +82,7 @@ void WindowManagerServiceImpl::FocusWindow(
}
void WindowManagerServiceImpl::ActivateWindow(
- view_manager::Id node,
+ Id node,
const Callback<void(bool)>& callback) {
bool success = window_manager_->IsReady();
if (success)
diff --git a/mojo/services/window_manager/window_manager_service_impl.h b/mojo/services/window_manager/window_manager_service_impl.h
index 4d61968..5756222 100644
--- a/mojo/services/window_manager/window_manager_service_impl.h
+++ b/mojo/services/window_manager/window_manager_service_impl.h
@@ -19,24 +19,21 @@ class WindowManagerServiceImpl : public InterfaceImpl<WindowManagerService> {
virtual ~WindowManagerServiceImpl();
void NotifyReady();
- void NotifyNodeFocused(view_manager::Id new_focused_id,
- view_manager::Id old_focused_id);
- void NotifyWindowActivated(view_manager::Id new_active_id,
- view_manager::Id old_active_id);
+ void NotifyNodeFocused(Id new_focused_id, Id old_focused_id);
+ void NotifyWindowActivated(Id new_active_id, Id old_active_id);
private:
// Overridden from WindowManagerService:
- virtual void OpenWindow(
- const Callback<void(view_manager::Id)>& callback) MOJO_OVERRIDE;
+ virtual void OpenWindow(const Callback<void(Id)>& callback) MOJO_OVERRIDE;
virtual void OpenWindowWithURL(
const String& url,
- const Callback<void(view_manager::Id)>& callback) MOJO_OVERRIDE;
- virtual void SetCapture(view_manager::Id node,
+ const Callback<void(Id)>& callback) MOJO_OVERRIDE;
+ virtual void SetCapture(Id node,
const Callback<void(bool)>& callback) MOJO_OVERRIDE;
- virtual void FocusWindow(view_manager::Id node,
+ virtual void FocusWindow(Id node,
const Callback<void(bool)>& callback) MOJO_OVERRIDE;
virtual void ActivateWindow(
- view_manager::Id node,
+ Id node,
const Callback<void(bool)>& callback) MOJO_OVERRIDE;
// Overridden from InterfaceImpl:
diff --git a/mojo/shell/view_manager_loader.cc b/mojo/shell/view_manager_loader.cc
index 9343059..bbcca5a 100644
--- a/mojo/shell/view_manager_loader.cc
+++ b/mojo/shell/view_manager_loader.cc
@@ -10,8 +10,7 @@
namespace mojo {
-using view_manager::ViewManagerInitService;
-using view_manager::service::ViewManagerInitServiceImpl;
+using service::ViewManagerInitServiceImpl;
namespace shell {
diff --git a/mojo/shell/view_manager_loader.h b/mojo/shell/view_manager_loader.h
index 72199f7..bb3a615 100644
--- a/mojo/shell/view_manager_loader.h
+++ b/mojo/shell/view_manager_loader.h
@@ -23,7 +23,7 @@ namespace shell {
class ViewManagerLoader
: public ServiceLoader,
public ApplicationDelegate,
- public InterfaceFactory<view_manager::ViewManagerInitService> {
+ public InterfaceFactory<ViewManagerInitService> {
public:
ViewManagerLoader();
virtual ~ViewManagerLoader();
@@ -41,13 +41,13 @@ class ViewManagerLoader
virtual bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) OVERRIDE;
- // InterfaceFactory<view_manager::ViewManagerInitService> overrides.
+ // InterfaceFactory<ViewManagerInitService> overrides.
virtual void Create(
ApplicationConnection* connection,
- InterfaceRequest<view_manager::ViewManagerInitService> request) OVERRIDE;
+ InterfaceRequest<ViewManagerInitService> request) OVERRIDE;
ScopedVector<Application> apps_;
- view_manager::service::ViewManagerInitServiceContext context_;
+ service::ViewManagerInitServiceContext context_;
DISALLOW_COPY_AND_ASSIGN(ViewManagerLoader);
};
diff --git a/mojo/views/native_widget_view_manager.cc b/mojo/views/native_widget_view_manager.cc
index 69fcf7f..8aeb7c7 100644
--- a/mojo/views/native_widget_view_manager.cc
+++ b/mojo/views/native_widget_view_manager.cc
@@ -87,7 +87,7 @@ class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
} // namespace
NativeWidgetViewManager::NativeWidgetViewManager(
- views::internal::NativeWidgetDelegate* delegate, view_manager::Node* node)
+ views::internal::NativeWidgetDelegate* delegate, Node* node)
: NativeWidgetAura(delegate),
node_(node),
view_(node_->active_view()) {
@@ -135,23 +135,23 @@ void NativeWidgetViewManager::CompositorContentsChanged(
view_->SetContents(bitmap);
}
-void NativeWidgetViewManager::OnNodeDestroyed(view_manager::Node* node) {
+void NativeWidgetViewManager::OnNodeDestroyed(Node* node) {
DCHECK_EQ(node, node_);
node->RemoveObserver(this);
node_ = NULL;
window_tree_host_.reset();
}
-void NativeWidgetViewManager::OnNodeBoundsChanged(view_manager::Node* node,
+void NativeWidgetViewManager::OnNodeBoundsChanged(Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
GetWidget()->SetBounds(gfx::Rect(node->bounds().size()));
}
void NativeWidgetViewManager::OnNodeActiveViewChanged(
- view_manager::Node* node,
- view_manager::View* old_view,
- view_manager::View* new_view) {
+ Node* node,
+ View* old_view,
+ View* new_view) {
if (old_view)
old_view->RemoveObserver(this);
if (new_view)
@@ -159,14 +159,14 @@ void NativeWidgetViewManager::OnNodeActiveViewChanged(
view_ = new_view;
}
-void NativeWidgetViewManager::OnViewInputEvent(view_manager::View* view,
+void NativeWidgetViewManager::OnViewInputEvent(View* view,
const EventPtr& event) {
scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event> >());
if (ui_event)
window_tree_host_->SendEventToProcessor(ui_event.get());
}
-void NativeWidgetViewManager::OnViewDestroyed(view_manager::View* view) {
+void NativeWidgetViewManager::OnViewDestroyed(View* view) {
DCHECK_EQ(view, view_);
view->RemoveObserver(this);
view_ = NULL;
diff --git a/mojo/views/native_widget_view_manager.h b/mojo/views/native_widget_view_manager.h
index 564e467..37096fe 100644
--- a/mojo/views/native_widget_view_manager.h
+++ b/mojo/views/native_widget_view_manager.h
@@ -27,11 +27,11 @@ class WindowTreeHostMojo;
class NativeWidgetViewManager : public views::NativeWidgetAura,
public WindowTreeHostMojoDelegate,
- public view_manager::ViewObserver,
- public view_manager::NodeObserver {
+ public ViewObserver,
+ public NodeObserver {
public:
NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate,
- view_manager::Node* node);
+ Node* node);
virtual ~NativeWidgetViewManager();
private:
@@ -42,19 +42,18 @@ class NativeWidgetViewManager : public views::NativeWidgetAura,
// WindowTreeHostMojoDelegate:
virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE;
- // view_manager::NodeObserver:
- virtual void OnNodeDestroyed(view_manager::Node* node) OVERRIDE;
- virtual void OnNodeActiveViewChanged(view_manager::Node* node,
- view_manager::View* old_view,
- view_manager::View* new_view) OVERRIDE;
- virtual void OnNodeBoundsChanged(view_manager::Node* node,
+ // NodeObserver:
+ virtual void OnNodeDestroyed(Node* node) OVERRIDE;
+ virtual void OnNodeActiveViewChanged(Node* node,
+ View* old_view,
+ View* new_view) OVERRIDE;
+ virtual void OnNodeBoundsChanged(Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) OVERRIDE;
- // view_manager::ViewObserver
- virtual void OnViewInputEvent(view_manager::View* view,
- const EventPtr& event) OVERRIDE;
- virtual void OnViewDestroyed(view_manager::View* view) OVERRIDE;
+ // ViewObserver
+ virtual void OnViewInputEvent(View* view, const EventPtr& event) OVERRIDE;
+ virtual void OnViewDestroyed(View* view) OVERRIDE;
scoped_ptr<WindowTreeHostMojo> window_tree_host_;
@@ -62,8 +61,8 @@ class NativeWidgetViewManager : public views::NativeWidgetAura,
scoped_ptr<ui::internal::InputMethodDelegate> ime_filter_;
- view_manager::Node* node_;
- view_manager::View* view_;
+ Node* node_;
+ View* view_;
scoped_ptr<wm::ScopedCaptureClient> capture_client_;