summaryrefslogtreecommitdiffstats
path: root/mandoline
diff options
context:
space:
mode:
authorfsamuel <fsamuel@chromium.org>2015-09-16 13:59:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-16 21:00:22 +0000
commit49b0d73f3ebb4801fc518751145504af3a2f70ed (patch)
treef3ea03dc99aadb6905ca1ac8002205b98390bb90 /mandoline
parentd09fa1676fb063d617bde289f552108ac17d1cde (diff)
downloadchromium_src-49b0d73f3ebb4801fc518751145504af3a2f70ed.zip
chromium_src-49b0d73f3ebb4801fc518751145504af3a2f70ed.tar.gz
chromium_src-49b0d73f3ebb4801fc518751145504af3a2f70ed.tar.bz2
Mandoline UI Process: Update namespaces and file names
This CL updates namespaces in components/mus to mus from mojo, surfaces, gles2, and view_manager. BUG=531533 TBR=jam@chromium.org for trivial pdf_viewer change. Review URL: https://codereview.chromium.org/1340983002 Cr-Commit-Position: refs/heads/master@{#349229}
Diffstat (limited to 'mandoline')
-rw-r--r--mandoline/services/core_services/application_delegate_factory_notandroid.cc4
-rw-r--r--mandoline/ui/aura/aura_init.cc2
-rw-r--r--mandoline/ui/aura/aura_init.h5
-rw-r--r--mandoline/ui/aura/input_method_mandoline.cc2
-rw-r--r--mandoline/ui/aura/input_method_mandoline.h6
-rw-r--r--mandoline/ui/aura/native_widget_view_manager.cc12
-rw-r--r--mandoline/ui/aura/native_widget_view_manager.h16
-rw-r--r--mandoline/ui/aura/surface_binding.cc27
-rw-r--r--mandoline/ui/aura/surface_binding.h7
-rw-r--r--mandoline/ui/aura/surface_context_factory.cc6
-rw-r--r--mandoline/ui/aura/surface_context_factory.h7
-rw-r--r--mandoline/ui/aura/window_tree_host_mojo.cc9
-rw-r--r--mandoline/ui/aura/window_tree_host_mojo.h10
-rw-r--r--mandoline/ui/desktop_ui/browser_window.cc14
-rw-r--r--mandoline/ui/desktop_ui/browser_window.h16
-rw-r--r--mandoline/ui/omnibox/omnibox_application.cc18
-rw-r--r--mandoline/ui/phone_ui/phone_browser_application_delegate.cc13
-rw-r--r--mandoline/ui/phone_ui/phone_browser_application_delegate.h30
18 files changed, 103 insertions, 101 deletions
diff --git a/mandoline/services/core_services/application_delegate_factory_notandroid.cc b/mandoline/services/core_services/application_delegate_factory_notandroid.cc
index 3b98097..6756c99 100644
--- a/mandoline/services/core_services/application_delegate_factory_notandroid.cc
+++ b/mandoline/services/core_services/application_delegate_factory_notandroid.cc
@@ -4,7 +4,7 @@
#include "mandoline/services/core_services/application_delegate_factory.h"
-#include "components/mus/view_manager_app.h"
+#include "components/mus/mus_app.h"
#include "components/resource_provider/resource_provider_app.h"
#include "mojo/services/network/network_service_delegate.h"
@@ -19,7 +19,7 @@ scoped_ptr<mojo::ApplicationDelegate> CreateApplicationDelegateNotAndroid(
new resource_provider::ResourceProviderApp("mojo:core_services"));
}
if (url == "mojo://mus/")
- return make_scoped_ptr(new view_manager::ViewManagerApp);
+ return make_scoped_ptr(new mus::MandolineUIServicesApp);
return nullptr;
}
diff --git a/mandoline/ui/aura/aura_init.cc b/mandoline/ui/aura/aura_init.cc
index 5d709bf..26f7619 100644
--- a/mandoline/ui/aura/aura_init.cc
+++ b/mandoline/ui/aura/aura_init.cc
@@ -37,7 +37,7 @@ std::set<std::string> GetResourcePaths() {
// TODO(sky): the 1.f should be view->viewport_metrics().device_scale_factor,
// but that causes clipping problems. No doubt we're not scaling a size
// correctly.
-AuraInit::AuraInit(mojo::View* view, mojo::Shell* shell)
+AuraInit::AuraInit(mus::View* view, mojo::Shell* shell)
: ui_init_(view->viewport_metrics().size_in_pixels.To<gfx::Size>(), 1.f) {
aura::Env::CreateInstance(false);
diff --git a/mandoline/ui/aura/aura_init.h b/mandoline/ui/aura/aura_init.h
index 69f1e3f..505adb4 100644
--- a/mandoline/ui/aura/aura_init.h
+++ b/mandoline/ui/aura/aura_init.h
@@ -14,6 +14,9 @@ class FontLoader;
namespace mojo {
class Shell;
+}
+
+namespace mus {
class View;
}
@@ -22,7 +25,7 @@ namespace mandoline {
// Sets up necessary state for aura when run with the viewmanager.
class AuraInit {
public:
- AuraInit(mojo::View* root, mojo::Shell* shell);
+ AuraInit(mus::View* root, mojo::Shell* shell);
~AuraInit();
private:
diff --git a/mandoline/ui/aura/input_method_mandoline.cc b/mandoline/ui/aura/input_method_mandoline.cc
index 747d1b5..6e7925c 100644
--- a/mandoline/ui/aura/input_method_mandoline.cc
+++ b/mandoline/ui/aura/input_method_mandoline.cc
@@ -17,7 +17,7 @@ namespace mandoline {
InputMethodMandoline::InputMethodMandoline(
ui::internal::InputMethodDelegate* delegate,
- mojo::View* view)
+ mus::View* view)
: view_(view) {
SetDelegate(delegate);
}
diff --git a/mandoline/ui/aura/input_method_mandoline.h b/mandoline/ui/aura/input_method_mandoline.h
index 1d90959..40a35a4e 100644
--- a/mandoline/ui/aura/input_method_mandoline.h
+++ b/mandoline/ui/aura/input_method_mandoline.h
@@ -7,7 +7,7 @@
#ifndef MANDOLINE_UI_AURA_INPUT_METHOD_MANDOLINE_H_
#define MANDOLINE_UI_AURA_INPUT_METHOD_MANDOLINE_H_
-namespace mojo {
+namespace mus {
class View;
} // namespace mojo
@@ -16,7 +16,7 @@ namespace mandoline {
class InputMethodMandoline : public ui::InputMethodBase {
public:
InputMethodMandoline(ui::internal::InputMethodDelegate* delegate,
- mojo::View* view);
+ mus::View* view);
~InputMethodMandoline() override;
private:
@@ -40,7 +40,7 @@ class InputMethodMandoline : public ui::InputMethodBase {
void UpdateTextInputType();
// The toplevel view which is not owned by this class.
- mojo::View* view_;
+ mus::View* view_;
DISALLOW_COPY_AND_ASSIGN(InputMethodMandoline);
};
diff --git a/mandoline/ui/aura/native_widget_view_manager.cc b/mandoline/ui/aura/native_widget_view_manager.cc
index 1665d18..ba86371 100644
--- a/mandoline/ui/aura/native_widget_view_manager.cc
+++ b/mandoline/ui/aura/native_widget_view_manager.cc
@@ -38,7 +38,7 @@ class FocusRulesImpl : public wm::BaseFocusRules {
NativeWidgetViewManager::NativeWidgetViewManager(
views::internal::NativeWidgetDelegate* delegate,
mojo::Shell* shell,
- mojo::View* view)
+ mus::View* view)
: NativeWidgetAura(delegate), view_(view) {
view_->AddObserver(this);
window_tree_host_.reset(new WindowTreeHostMojo(shell, view_));
@@ -76,7 +76,7 @@ void NativeWidgetViewManager::OnWindowVisibilityChanged(aura::Window* window,
// I'm not bothering.
}
-void NativeWidgetViewManager::OnViewDestroyed(mojo::View* view) {
+void NativeWidgetViewManager::OnViewDestroyed(mus::View* view) {
DCHECK_EQ(view, view_);
view->RemoveObserver(this);
view_ = NULL;
@@ -85,22 +85,22 @@ void NativeWidgetViewManager::OnViewDestroyed(mojo::View* view) {
}
void NativeWidgetViewManager::OnViewBoundsChanged(
- mojo::View* view,
+ mus::View* view,
const mojo::Rect& old_bounds,
const mojo::Rect& new_bounds) {
gfx::Rect view_rect = view->bounds().To<gfx::Rect>();
GetWidget()->SetBounds(gfx::Rect(view_rect.size()));
}
-void NativeWidgetViewManager::OnViewFocusChanged(mojo::View* gained_focus,
- mojo::View* lost_focus) {
+void NativeWidgetViewManager::OnViewFocusChanged(mus::View* gained_focus,
+ mus::View* lost_focus) {
if (gained_focus == view_)
window_tree_host_->GetInputMethod()->OnFocus();
else if (lost_focus == view_)
window_tree_host_->GetInputMethod()->OnBlur();
}
-void NativeWidgetViewManager::OnViewInputEvent(mojo::View* view,
+void NativeWidgetViewManager::OnViewInputEvent(mus::View* view,
const mojo::EventPtr& event) {
scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>());
if (!ui_event)
diff --git a/mandoline/ui/aura/native_widget_view_manager.h b/mandoline/ui/aura/native_widget_view_manager.h
index 83fb556a..22cce85 100644
--- a/mandoline/ui/aura/native_widget_view_manager.h
+++ b/mandoline/ui/aura/native_widget_view_manager.h
@@ -33,11 +33,11 @@ namespace mandoline {
class WindowTreeHostMojo;
class NativeWidgetViewManager : public views::NativeWidgetAura,
- public mojo::ViewObserver {
+ public mus::ViewObserver {
public:
NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate,
mojo::Shell* shell,
- mojo::View* view);
+ mus::View* view);
~NativeWidgetViewManager() override;
private:
@@ -46,19 +46,19 @@ class NativeWidgetViewManager : public views::NativeWidgetAura,
void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
// ViewObserver:
- void OnViewDestroyed(mojo::View* view) override;
- void OnViewBoundsChanged(mojo::View* view,
+ void OnViewDestroyed(mus::View* view) override;
+ void OnViewBoundsChanged(mus::View* view,
const mojo::Rect& old_bounds,
const mojo::Rect& new_bounds) override;
- void OnViewFocusChanged(mojo::View* gained_focus,
- mojo::View* lost_focus) override;
- void OnViewInputEvent(mojo::View* view, const mojo::EventPtr& event) override;
+ void OnViewFocusChanged(mus::View* gained_focus,
+ mus::View* lost_focus) override;
+ void OnViewInputEvent(mus::View* view, const mojo::EventPtr& event) override;
scoped_ptr<WindowTreeHostMojo> window_tree_host_;
scoped_ptr<wm::FocusController> focus_client_;
- mojo::View* view_;
+ mus::View* view_;
scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
diff --git a/mandoline/ui/aura/surface_binding.cc b/mandoline/ui/aura/surface_binding.cc
index df2299e..8048373 100644
--- a/mandoline/ui/aura/surface_binding.cc
+++ b/mandoline/ui/aura/surface_binding.cc
@@ -42,17 +42,17 @@ class SurfaceBinding::PerConnectionState
: public base::RefCounted<PerConnectionState> {
public:
static PerConnectionState* Get(mojo::Shell* shell,
- mojo::ViewTreeConnection* connection);
+ mus::ViewTreeConnection* connection);
- scoped_ptr<cc::OutputSurface> CreateOutputSurface(mojo::View* view);
+ scoped_ptr<cc::OutputSurface> CreateOutputSurface(mus::View* view);
private:
- typedef std::map<mojo::ViewTreeConnection*,
- PerConnectionState*> ConnectionToStateMap;
+ typedef std::map<mus::ViewTreeConnection*, PerConnectionState*>
+ ConnectionToStateMap;
friend class base::RefCounted<PerConnectionState>;
- PerConnectionState(mojo::Shell* shell, mojo::ViewTreeConnection* connection);
+ PerConnectionState(mojo::Shell* shell, mus::ViewTreeConnection* connection);
~PerConnectionState();
void Init();
@@ -61,7 +61,7 @@ class SurfaceBinding::PerConnectionState
base::ThreadLocalPointer<ConnectionToStateMap>>::Leaky view_states;
mojo::Shell* shell_;
- mojo::ViewTreeConnection* connection_;
+ mus::ViewTreeConnection* connection_;
// Set of state needed to create an OutputSurface.
mojo::GpuPtr gpu_;
@@ -77,7 +77,7 @@ base::LazyInstance<base::ThreadLocalPointer<
// static
SurfaceBinding::PerConnectionState* SurfaceBinding::PerConnectionState::Get(
mojo::Shell* shell,
- mojo::ViewTreeConnection* connection) {
+ mus::ViewTreeConnection* connection) {
ConnectionToStateMap* view_map = view_states.Pointer()->Get();
if (!view_map) {
view_map = new ConnectionToStateMap;
@@ -91,7 +91,7 @@ SurfaceBinding::PerConnectionState* SurfaceBinding::PerConnectionState::Get(
}
scoped_ptr<cc::OutputSurface>
-SurfaceBinding::PerConnectionState::CreateOutputSurface(mojo::View* view) {
+SurfaceBinding::PerConnectionState::CreateOutputSurface(mus::View* view) {
// TODO(sky): figure out lifetime here. Do I need to worry about the return
// value outliving this?
mojo::CommandBufferPtr cb;
@@ -105,9 +105,8 @@ SurfaceBinding::PerConnectionState::CreateOutputSurface(mojo::View* view) {
SurfaceBinding::PerConnectionState::PerConnectionState(
mojo::Shell* shell,
- mojo::ViewTreeConnection* connection)
- : shell_(shell) {
-}
+ mus::ViewTreeConnection* connection)
+ : shell_(shell) {}
SurfaceBinding::PerConnectionState::~PerConnectionState() {
ConnectionToStateMap* view_map = view_states.Pointer()->Get();
@@ -132,10 +131,8 @@ void SurfaceBinding::PerConnectionState::Init() {
// SurfaceBinding --------------------------------------------------------------
-SurfaceBinding::SurfaceBinding(mojo::Shell* shell, mojo::View* view)
- : view_(view),
- state_(PerConnectionState::Get(shell, view->connection())) {
-}
+SurfaceBinding::SurfaceBinding(mojo::Shell* shell, mus::View* view)
+ : view_(view), state_(PerConnectionState::Get(shell, view->connection())) {}
SurfaceBinding::~SurfaceBinding() {
}
diff --git a/mandoline/ui/aura/surface_binding.h b/mandoline/ui/aura/surface_binding.h
index f36002d..840eeba 100644
--- a/mandoline/ui/aura/surface_binding.h
+++ b/mandoline/ui/aura/surface_binding.h
@@ -14,6 +14,9 @@ class OutputSurface;
namespace mojo {
class Shell;
+}
+
+namespace mus {
class View;
}
@@ -26,7 +29,7 @@ namespace mandoline {
// share the same connection.
class SurfaceBinding {
public:
- SurfaceBinding(mojo::Shell* shell, mojo::View* view);
+ SurfaceBinding(mojo::Shell* shell, mus::View* view);
~SurfaceBinding();
// Creates an OutputSurface that renders to the View supplied to the
@@ -37,7 +40,7 @@ class SurfaceBinding {
class PerConnectionState;
mojo::Shell* shell_;
- mojo::View* view_;
+ mus::View* view_;
scoped_refptr<PerConnectionState> state_;
DISALLOW_COPY_AND_ASSIGN(SurfaceBinding);
diff --git a/mandoline/ui/aura/surface_context_factory.cc b/mandoline/ui/aura/surface_context_factory.cc
index 1f1589d..0a75487 100644
--- a/mandoline/ui/aura/surface_context_factory.cc
+++ b/mandoline/ui/aura/surface_context_factory.cc
@@ -27,10 +27,8 @@ class FakeReflector : public ui::Reflector {
}
SurfaceContextFactory::SurfaceContextFactory(mojo::Shell* shell,
- mojo::View* view)
- : surface_binding_(shell, view),
- next_surface_id_namespace_(1u) {
-}
+ mus::View* view)
+ : surface_binding_(shell, view), next_surface_id_namespace_(1u) {}
SurfaceContextFactory::~SurfaceContextFactory() {
}
diff --git a/mandoline/ui/aura/surface_context_factory.h b/mandoline/ui/aura/surface_context_factory.h
index 92d4d25..dd859eb 100644
--- a/mandoline/ui/aura/surface_context_factory.h
+++ b/mandoline/ui/aura/surface_context_factory.h
@@ -12,6 +12,9 @@
namespace mojo {
class Shell;
+}
+
+namespace mus {
class View;
}
@@ -19,7 +22,7 @@ namespace mandoline {
class SurfaceContextFactory : public ui::ContextFactory {
public:
- SurfaceContextFactory(mojo::Shell* shell, mojo::View* view);
+ SurfaceContextFactory(mojo::Shell* shell, mus::View* view);
~SurfaceContextFactory() override;
private:
@@ -44,7 +47,7 @@ class SurfaceContextFactory : public ui::ContextFactory {
SurfaceBinding surface_binding_;
uint32_t next_surface_id_namespace_;
gles2::RasterThreadHelper raster_thread_helper_;
- gles2::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_;
+ mus::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_;
DISALLOW_COPY_AND_ASSIGN(SurfaceContextFactory);
};
diff --git a/mandoline/ui/aura/window_tree_host_mojo.cc b/mandoline/ui/aura/window_tree_host_mojo.cc
index 227e41d..c2a5dc3 100644
--- a/mandoline/ui/aura/window_tree_host_mojo.cc
+++ b/mandoline/ui/aura/window_tree_host_mojo.cc
@@ -20,7 +20,7 @@ namespace mandoline {
////////////////////////////////////////////////////////////////////////////////
// WindowTreeHostMojo, public:
-WindowTreeHostMojo::WindowTreeHostMojo(mojo::Shell* shell, mojo::View* view)
+WindowTreeHostMojo::WindowTreeHostMojo(mojo::Shell* shell, mus::View* view)
: view_(view), bounds_(view->bounds().To<gfx::Rect>()) {
view_->AddObserver(this);
@@ -99,10 +99,9 @@ void WindowTreeHostMojo::OnCursorVisibilityChangedNative(bool show) {
////////////////////////////////////////////////////////////////////////////////
// WindowTreeHostMojo, ViewObserver implementation:
-void WindowTreeHostMojo::OnViewBoundsChanged(
- mojo::View* view,
- const mojo::Rect& old_bounds,
- const mojo::Rect& new_bounds) {
+void WindowTreeHostMojo::OnViewBoundsChanged(mus::View* view,
+ const mojo::Rect& old_bounds,
+ const mojo::Rect& new_bounds) {
gfx::Rect old_bounds2 = old_bounds.To<gfx::Rect>();
gfx::Rect new_bounds2 = new_bounds.To<gfx::Rect>();
bounds_ = new_bounds2;
diff --git a/mandoline/ui/aura/window_tree_host_mojo.h b/mandoline/ui/aura/window_tree_host_mojo.h
index b3ce943..277b423 100644
--- a/mandoline/ui/aura/window_tree_host_mojo.h
+++ b/mandoline/ui/aura/window_tree_host_mojo.h
@@ -27,9 +27,9 @@ class InputMethodMandoline;
class SurfaceContextFactory;
class WindowTreeHostMojo : public aura::WindowTreeHost,
- public mojo::ViewObserver {
+ public mus::ViewObserver {
public:
- WindowTreeHostMojo(mojo::Shell* shell, mojo::View* view);
+ WindowTreeHostMojo(mojo::Shell* shell, mus::View* view);
~WindowTreeHostMojo() override;
const gfx::Rect& bounds() const { return bounds_; }
@@ -53,12 +53,12 @@ class WindowTreeHostMojo : public aura::WindowTreeHost,
void MoveCursorToNative(const gfx::Point& location) override;
void OnCursorVisibilityChangedNative(bool show) override;
- // mojo::ViewObserver:
- void OnViewBoundsChanged(mojo::View* view,
+ // mus::ViewObserver:
+ void OnViewBoundsChanged(mus::View* view,
const mojo::Rect& old_bounds,
const mojo::Rect& new_bounds) override;
- mojo::View* view_;
+ mus::View* view_;
gfx::Rect bounds_;
diff --git a/mandoline/ui/desktop_ui/browser_window.cc b/mandoline/ui/desktop_ui/browser_window.cc
index a62299e..a6b7e93 100644
--- a/mandoline/ui/desktop_ui/browser_window.cc
+++ b/mandoline/ui/desktop_ui/browser_window.cc
@@ -80,7 +80,7 @@ BrowserWindow::BrowserWindow(mojo::ApplicationImpl* app,
web_view_(this) {
mojo::ViewTreeHostClientPtr host_client;
host_client_binding_.Bind(GetProxy(&host_client));
- mojo::CreateViewTreeHost(host_factory, host_client.Pass(), this, &host_);
+ mus::CreateViewTreeHost(host_factory, host_client.Pass(), this, &host_);
}
void BrowserWindow::LoadURL(const GURL& url) {
@@ -103,7 +103,7 @@ void BrowserWindow::LoadURL(const GURL& url) {
void BrowserWindow::Close() {
if (root_)
- mojo::ScopedViewPtr::DeleteViewOrViewManager(root_);
+ mus::ScopedViewPtr::DeleteViewOrViewManager(root_);
else
delete this;
}
@@ -143,9 +143,9 @@ float BrowserWindow::DIPSToPixels(float value) const {
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserWindow, mojo::ViewTreeDelegate implementation:
+// BrowserWindow, mus::ViewTreeDelegate implementation:
-void BrowserWindow::OnEmbed(mojo::View* root) {
+void BrowserWindow::OnEmbed(mus::View* root) {
// BrowserWindow does not support being embedded more than once.
CHECK(!root_);
@@ -200,13 +200,13 @@ void BrowserWindow::OnEmbed(mojo::View* root) {
}
}
-void BrowserWindow::OnConnectionLost(mojo::ViewTreeConnection* connection) {
+void BrowserWindow::OnConnectionLost(mus::ViewTreeConnection* connection) {
root_ = nullptr;
delete this;
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserWindow, mojo::ViewTreeHostClient implementation:
+// BrowserWindow, mus::ViewTreeHostClient implementation:
void BrowserWindow::OnAccelerator(uint32_t id, mojo::EventPtr event) {
switch (static_cast<BrowserCommand>(id)) {
@@ -328,7 +328,7 @@ void BrowserWindow::Layout(views::View* host) {
////////////////////////////////////////////////////////////////////////////////
// BrowserWindow, private:
-void BrowserWindow::Init(mojo::View* root) {
+void BrowserWindow::Init(mus::View* root) {
DCHECK_GT(root->viewport_metrics().device_pixel_ratio, 0);
if (!aura_init_)
aura_init_.reset(new AuraInit(root, app_->shell()));
diff --git a/mandoline/ui/desktop_ui/browser_window.h b/mandoline/ui/desktop_ui/browser_window.h
index c2ff8de..576e927 100644
--- a/mandoline/ui/desktop_ui/browser_window.h
+++ b/mandoline/ui/desktop_ui/browser_window.h
@@ -30,7 +30,7 @@ class BrowserManager;
class ProgressView;
class ToolbarView;
-class BrowserWindow : public mojo::ViewTreeDelegate,
+class BrowserWindow : public mus::ViewTreeDelegate,
public mojo::ViewTreeHostClient,
public web_view::mojom::WebViewClient,
public ViewEmbedder,
@@ -53,9 +53,9 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
float DIPSToPixels(float value) const;
- // Overridden from mojo::ViewTreeDelegate:
- void OnEmbed(mojo::View* root) override;
- void OnConnectionLost(mojo::ViewTreeConnection* connection) override;
+ // Overridden from mus::ViewTreeDelegate:
+ void OnEmbed(mus::View* root) override;
+ void OnConnectionLost(mus::ViewTreeConnection* connection) override;
// Overridden from ViewTreeHostClient:
void OnAccelerator(uint32_t id, mojo::EventPtr event) override;
@@ -80,7 +80,7 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
gfx::Size GetPreferredSize(const views::View* view) const override;
void Layout(views::View* host) override;
- void Init(mojo::View* root);
+ void Init(mus::View* root);
void EmbedOmnibox();
mojo::ApplicationImpl* app_;
@@ -90,9 +90,9 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
BrowserManager* manager_;
ToolbarView* toolbar_view_;
ProgressView* progress_bar_;
- mojo::View* root_;
- mojo::View* content_;
- mojo::View* omnibox_view_;
+ mus::View* root_;
+ mus::View* content_;
+ mus::View* omnibox_view_;
mojo::WeakBindingSet<ViewEmbedder> view_embedder_bindings_;
diff --git a/mandoline/ui/omnibox/omnibox_application.cc b/mandoline/ui/omnibox/omnibox_application.cc
index 18930e3..c3b42de 100644
--- a/mandoline/ui/omnibox/omnibox_application.cc
+++ b/mandoline/ui/omnibox/omnibox_application.cc
@@ -26,7 +26,7 @@ namespace mandoline {
////////////////////////////////////////////////////////////////////////////////
// OmniboxImpl
-class OmniboxImpl : public mojo::ViewTreeDelegate,
+class OmniboxImpl : public mus::ViewTreeDelegate,
public views::LayoutManager,
public views::TextfieldController,
public Omnibox {
@@ -37,9 +37,9 @@ class OmniboxImpl : public mojo::ViewTreeDelegate,
~OmniboxImpl() override;
private:
- // Overridden from mojo::ViewTreeDelegate:
- void OnEmbed(mojo::View* root) override;
- void OnConnectionLost(mojo::ViewTreeConnection* connection) override;
+ // Overridden from mus::ViewTreeDelegate:
+ void OnEmbed(mus::View* root) override;
+ void OnConnectionLost(mus::ViewTreeConnection* connection) override;
// Overridden from views::LayoutManager:
gfx::Size GetPreferredSize(const views::View* view) const override;
@@ -59,7 +59,7 @@ class OmniboxImpl : public mojo::ViewTreeDelegate,
scoped_ptr<AuraInit> aura_init_;
mojo::ApplicationImpl* app_;
- mojo::View* root_;
+ mus::View* root_;
mojo::String url_;
views::Textfield* edit_;
mojo::Binding<Omnibox> binding_;
@@ -110,9 +110,9 @@ OmniboxImpl::OmniboxImpl(mojo::ApplicationImpl* app,
OmniboxImpl::~OmniboxImpl() {}
////////////////////////////////////////////////////////////////////////////////
-// OmniboxImpl, mojo::ViewTreeDelegate implementation:
+// OmniboxImpl, mus::ViewTreeDelegate implementation:
-void OmniboxImpl::OnEmbed(mojo::View* root) {
+void OmniboxImpl::OnEmbed(mus::View* root) {
root_ = root;
if (!aura_init_.get()) {
@@ -148,7 +148,7 @@ void OmniboxImpl::OnEmbed(mojo::View* root) {
ShowWindow();
}
-void OmniboxImpl::OnConnectionLost(mojo::ViewTreeConnection* connection) {
+void OmniboxImpl::OnConnectionLost(mus::ViewTreeConnection* connection) {
root_ = nullptr;
}
@@ -190,7 +190,7 @@ bool OmniboxImpl::HandleKeyEvent(views::Textfield* sender,
void OmniboxImpl::GetViewTreeClient(
mojo::InterfaceRequest<mojo::ViewTreeClient> request) {
- mojo::ViewTreeConnection::Create(this, request.Pass());
+ mus::ViewTreeConnection::Create(this, request.Pass());
}
void OmniboxImpl::ShowForURL(const mojo::String& url) {
diff --git a/mandoline/ui/phone_ui/phone_browser_application_delegate.cc b/mandoline/ui/phone_ui/phone_browser_application_delegate.cc
index 93307aa..db21dde 100644
--- a/mandoline/ui/phone_ui/phone_browser_application_delegate.cc
+++ b/mandoline/ui/phone_ui/phone_browser_application_delegate.cc
@@ -47,7 +47,7 @@ void PhoneBrowserApplicationDelegate::Initialize(mojo::ApplicationImpl* app) {
break;
}
}
- mojo::CreateSingleViewTreeHost(app_, this, &host_);
+ mus::CreateSingleViewTreeHost(app_, this, &host_);
}
bool PhoneBrowserApplicationDelegate::ConfigureIncomingConnection(
@@ -66,9 +66,9 @@ void PhoneBrowserApplicationDelegate::LaunchURL(const mojo::String& url) {
}
////////////////////////////////////////////////////////////////////////////////
-// PhoneBrowserApplicationDelegate, mojo::ViewTreeDelegate implementation:
+// PhoneBrowserApplicationDelegate, mus::ViewTreeDelegate implementation:
-void PhoneBrowserApplicationDelegate::OnEmbed(mojo::View* root) {
+void PhoneBrowserApplicationDelegate::OnEmbed(mus::View* root) {
CHECK(!root_);
root_ = root;
content_ = root->connection()->CreateView();
@@ -83,14 +83,13 @@ void PhoneBrowserApplicationDelegate::OnEmbed(mojo::View* root) {
}
void PhoneBrowserApplicationDelegate::OnConnectionLost(
- mojo::ViewTreeConnection* connection) {
-}
+ mus::ViewTreeConnection* connection) {}
////////////////////////////////////////////////////////////////////////////////
-// PhoneBrowserApplicationDelegate, mojo::ViewObserver implementation:
+// PhoneBrowserApplicationDelegate, mus::ViewObserver implementation:
void PhoneBrowserApplicationDelegate::OnViewBoundsChanged(
- mojo::View* view,
+ mus::View* view,
const mojo::Rect& old_bounds,
const mojo::Rect& new_bounds) {
CHECK_EQ(view, root_);
diff --git a/mandoline/ui/phone_ui/phone_browser_application_delegate.h b/mandoline/ui/phone_ui/phone_browser_application_delegate.h
index bb41044..0193eed 100644
--- a/mandoline/ui/phone_ui/phone_browser_application_delegate.h
+++ b/mandoline/ui/phone_ui/phone_browser_application_delegate.h
@@ -18,19 +18,19 @@
#include "mojo/application/public/cpp/interface_factory.h"
#include "mojo/common/weak_binding_set.h"
-namespace mojo {
+namespace mus {
class View;
}
namespace mandoline {
-class PhoneBrowserApplicationDelegate :
- public mojo::ApplicationDelegate,
- public LaunchHandler,
- public mojo::ViewTreeDelegate,
- public mojo::ViewObserver,
- public web_view::mojom::WebViewClient,
- public mojo::InterfaceFactory<LaunchHandler> {
+class PhoneBrowserApplicationDelegate
+ : public mojo::ApplicationDelegate,
+ public LaunchHandler,
+ public mus::ViewTreeDelegate,
+ public mus::ViewObserver,
+ public web_view::mojom::WebViewClient,
+ public mojo::InterfaceFactory<LaunchHandler> {
public:
PhoneBrowserApplicationDelegate();
~PhoneBrowserApplicationDelegate() override;
@@ -44,12 +44,12 @@ class PhoneBrowserApplicationDelegate :
// Overridden from LaunchHandler:
void LaunchURL(const mojo::String& url) override;
- // Overridden from mojo::ViewTreeDelegate:
- void OnEmbed(mojo::View* root) override;
- void OnConnectionLost(mojo::ViewTreeConnection* connection) override;
+ // Overridden from mus::ViewTreeDelegate:
+ void OnEmbed(mus::View* root) override;
+ void OnConnectionLost(mus::ViewTreeConnection* connection) override;
- // Overridden from mojo::ViewObserver:
- void OnViewBoundsChanged(mojo::View* view,
+ // Overridden from mus::ViewObserver:
+ void OnViewBoundsChanged(mus::View* view,
const mojo::Rect& old_bounds,
const mojo::Rect& new_bounds) override;
@@ -68,8 +68,8 @@ class PhoneBrowserApplicationDelegate :
mojo::ApplicationImpl* app_;
mojo::ViewTreeHostPtr host_;
- mojo::View* root_;
- mojo::View* content_;
+ mus::View* root_;
+ mus::View* content_;
web_view::WebView web_view_;
mojo::String default_url_;