diff options
Diffstat (limited to 'components/html_viewer')
19 files changed, 101 insertions, 107 deletions
diff --git a/components/html_viewer/ax_provider_apptest.cc b/components/html_viewer/ax_provider_apptest.cc index 5c35485..5068fa2 100644 --- a/components/html_viewer/ax_provider_apptest.cc +++ b/components/html_viewer/ax_provider_apptest.cc @@ -62,7 +62,7 @@ class TestFrameTreeServer : public web_view::FrameTreeServer { } // namespace -using AXProviderTest = mus::ViewManagerTestBase; +using AXProviderTest = ViewManagerTestBase; TEST_F(AXProviderTest, HelloWorld) { // Start a test server for net/data/test.html access. @@ -82,7 +82,7 @@ TEST_F(AXProviderTest, HelloWorld) { // Embed the html_viewer in a View. ViewTreeClientPtr tree_client; connection->ConnectToService(&tree_client); - mus::View* embed_view = window_manager()->CreateView(); + View* embed_view = window_manager()->CreateView(); embed_view->Embed(tree_client.Pass()); TestFrameTreeServer frame_tree_server; diff --git a/components/html_viewer/document_resource_waiter.cc b/components/html_viewer/document_resource_waiter.cc index cda1baf..8f80bf8 100644 --- a/components/html_viewer/document_resource_waiter.cc +++ b/components/html_viewer/document_resource_waiter.cc @@ -58,7 +58,7 @@ mojo::URLResponsePtr DocumentResourceWaiter::ReleaseURLResponse() { return response_.Pass(); } -void DocumentResourceWaiter::SetRoot(mus::View* root) { +void DocumentResourceWaiter::SetRoot(mojo::View* root) { DCHECK(!root_); root_ = root; root_->AddObserver(this); @@ -173,13 +173,13 @@ void DocumentResourceWaiter::OnWillNavigate(uint32_t target_frame_id) { } void DocumentResourceWaiter::OnViewViewportMetricsChanged( - mus::View* view, + mojo::View* view, const mojo::ViewportMetrics& old_metrics, const mojo::ViewportMetrics& new_metrics) { UpdateIsReady(); } -void DocumentResourceWaiter::OnViewDestroyed(mus::View* view) { +void DocumentResourceWaiter::OnViewDestroyed(mojo::View* view) { root_->RemoveObserver(this); root_ = nullptr; } diff --git a/components/html_viewer/document_resource_waiter.h b/components/html_viewer/document_resource_waiter.h index 380d615..f425c0c 100644 --- a/components/html_viewer/document_resource_waiter.h +++ b/components/html_viewer/document_resource_waiter.h @@ -27,7 +27,7 @@ class GlobalState; // assumed HTMLDocument will call back for the FrameTreeClient and FrameData. class DocumentResourceWaiter : public web_view::FrameTreeClient, public HTMLFrameTreeManagerObserver, - public mus::ViewObserver { + public mojo::ViewObserver { public: DocumentResourceWaiter(GlobalState* global_state, mojo::URLResponsePtr response, @@ -51,8 +51,8 @@ class DocumentResourceWaiter : public web_view::FrameTreeClient, // See class description. bool is_ready() const { return is_ready_; } - void SetRoot(mus::View* root); - mus::View* root() { return root_; } + void SetRoot(mojo::View* root); + mojo::View* root() { return root_; } void Bind(mojo::InterfaceRequest<web_view::FrameTreeClient> request); @@ -80,10 +80,10 @@ class DocumentResourceWaiter : public web_view::FrameTreeClient, // ViewObserver: void OnViewViewportMetricsChanged( - mus::View* view, + mojo::View* view, const mojo::ViewportMetrics& old_metrics, const mojo::ViewportMetrics& new_metrics) override; - void OnViewDestroyed(mus::View* view) override; + void OnViewDestroyed(mojo::View* view) override; // HTMLFrameTreeManagerObserver: void OnHTMLFrameTreeManagerChangeIdAdvanced() override; @@ -92,7 +92,7 @@ class DocumentResourceWaiter : public web_view::FrameTreeClient, GlobalState* global_state_; HTMLDocument* document_; mojo::URLResponsePtr response_; - mus::View* root_; + mojo::View* root_; web_view::FrameTreeServerPtr server_; mojo::Array<web_view::FrameDataPtr> frame_data_; uint32_t change_id_; diff --git a/components/html_viewer/global_state.h b/components/html_viewer/global_state.h index 0d60e79..28ee041 100644 --- a/components/html_viewer/global_state.h +++ b/components/html_viewer/global_state.h @@ -74,7 +74,7 @@ class GlobalState { return &raster_thread_helper_; } - mus::MojoGpuMemoryBufferManager* gpu_memory_buffer_manager() { + gles2::MojoGpuMemoryBufferManager* gpu_memory_buffer_manager() { return &gpu_memory_buffer_manager_; } @@ -109,7 +109,7 @@ class GlobalState { scoped_ptr<BlinkPlatformImpl> blink_platform_; base::Thread compositor_thread_; gles2::RasterThreadHelper raster_thread_helper_; - mus::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_; + gles2::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_; scoped_ptr<MediaFactory> media_factory_; #if defined(OS_LINUX) && !defined(OS_ANDROID) diff --git a/components/html_viewer/html_document.cc b/components/html_viewer/html_document.cc index 79bf312..32ae0dd 100644 --- a/components/html_viewer/html_document.cc +++ b/components/html_viewer/html_document.cc @@ -31,7 +31,7 @@ #include "ui/gfx/geometry/size.h" using mojo::AxProvider; -using mus::View; +using mojo::View; namespace html_viewer { namespace { @@ -48,23 +48,23 @@ bool IsTestInterfaceEnabled() { // A ViewTreeDelegate implementation that delegates to a (swappable) delegate. // This is used when one HTMLDocument takes over for another delegate // (OnSwap()). -class ViewTreeDelegateImpl : public mus::ViewTreeDelegate { +class ViewTreeDelegateImpl : public mojo::ViewTreeDelegate { public: - explicit ViewTreeDelegateImpl(mus::ViewTreeDelegate* delegate) + explicit ViewTreeDelegateImpl(mojo::ViewTreeDelegate* delegate) : delegate_(delegate) {} ~ViewTreeDelegateImpl() override {} - void set_delegate(mus::ViewTreeDelegate* delegate) { delegate_ = delegate; } + void set_delegate(mojo::ViewTreeDelegate* delegate) { delegate_ = delegate; } private: // ViewTreeDelegate: - void OnEmbed(mus::View* root) override { delegate_->OnEmbed(root); } + void OnEmbed(mojo::View* root) override { delegate_->OnEmbed(root); } void OnUnembed() override { delegate_->OnUnembed(); } - void OnConnectionLost(mus::ViewTreeConnection* connection) override { + void OnConnectionLost(mojo::ViewTreeConnection* connection) override { delegate_->OnConnectionLost(connection); } - mus::ViewTreeDelegate* delegate_; + mojo::ViewTreeDelegate* delegate_; DISALLOW_COPY_AND_ASSIGN(ViewTreeDelegateImpl); }; @@ -117,7 +117,7 @@ HTMLDocument::HTMLDocument(mojo::ApplicationImpl* html_document_app, void HTMLDocument::Destroy() { if (resource_waiter_) { - mus::View* root = resource_waiter_->root(); + mojo::View* root = resource_waiter_->root(); if (root) { resource_waiter_.reset(); delete root->connection(); @@ -149,7 +149,7 @@ void HTMLDocument::Load() { DCHECK(resource_waiter_ && resource_waiter_->is_ready()); // Note: |view| is null if we're taking over for an existing frame. - mus::View* view = resource_waiter_->root(); + mojo::View* view = resource_waiter_->root(); if (view) { global_state_->InitIfNecessary( view->viewport_metrics().size_in_pixels.To<gfx::Size>(), @@ -200,7 +200,7 @@ void HTMLDocument::OnEmbed(View* root) { resource_waiter_->SetRoot(root); } -void HTMLDocument::OnConnectionLost(mus::ViewTreeConnection* connection) { +void HTMLDocument::OnConnectionLost(mojo::ViewTreeConnection* connection) { delete this; } @@ -316,7 +316,7 @@ void HTMLDocument::Create( transferable_state_.view_tree_delegate_impl.reset( new ViewTreeDelegateImpl(this)); transferable_state_.owns_view_tree_connection = true; - mus::ViewTreeConnection::Create( + mojo::ViewTreeConnection::Create( transferable_state_.view_tree_delegate_impl.get(), request.Pass()); } diff --git a/components/html_viewer/html_document.h b/components/html_viewer/html_document.h index 6b6f961..6caf054 100644 --- a/components/html_viewer/html_document.h +++ b/components/html_viewer/html_document.h @@ -27,7 +27,7 @@ namespace base { class SingleThreadTaskRunner; } -namespace mus { +namespace mojo { class View; class ViewTreeConnection; } @@ -49,7 +49,7 @@ class WebLayerTreeViewImpl; // . When the View the HTMLDocument is embedded in is destroyed. // . Explicitly by way of Destroy(). class HTMLDocument - : public mus::ViewTreeDelegate, + : public mojo::ViewTreeDelegate, public HTMLFrameDelegate, public mojo::InterfaceFactory<mojo::AxProvider>, public mojo::InterfaceFactory<web_view::FrameTreeClient>, @@ -96,7 +96,7 @@ class HTMLDocument void Move(TransferableState* other); bool owns_view_tree_connection; - mus::View* root; + mojo::View* root; scoped_ptr<ViewTreeDelegateImpl> view_tree_delegate_impl; }; @@ -107,8 +107,8 @@ class HTMLDocument BeforeLoadCache* GetBeforeLoadCache(); // ViewTreeDelegate: - void OnEmbed(mus::View* root) override; - void OnConnectionLost(mus::ViewTreeConnection* connection) override; + void OnEmbed(mojo::View* root) override; + void OnConnectionLost(mojo::ViewTreeConnection* connection) override; // HTMLFrameDelegate: mojo::ApplicationImpl* GetApp() override; @@ -136,7 +136,7 @@ class HTMLDocument mojo::ApplicationConnection* connection, mojo::InterfaceRequest<devtools_service::DevToolsAgent> request) override; - // mojo::InterfaceFactory<mus::ViewTreeClient>: + // mojo::InterfaceFactory<mojo::ViewTreeClient>: void Create(mojo::ApplicationConnection* connection, mojo::InterfaceRequest<mojo::ViewTreeClient> request) override; diff --git a/components/html_viewer/html_frame.cc b/components/html_viewer/html_frame.cc index 77d1524..718722f 100644 --- a/components/html_viewer/html_frame.cc +++ b/components/html_viewer/html_frame.cc @@ -71,7 +71,7 @@ using mojo::AxProvider; using mojo::Rect; using mojo::ServiceProviderPtr; using mojo::URLResponsePtr; -using mus::View; +using mojo::View; using web_view::HTMLMessageEvent; using web_view::HTMLMessageEventPtr; @@ -275,7 +275,7 @@ HTMLFrame::~HTMLFrame() { if (view_) { view_->RemoveObserver(this); - mus::ScopedViewPtr::DeleteViewOrViewManager(view_); + mojo::ScopedViewPtr::DeleteViewOrViewManager(view_); } } @@ -300,7 +300,7 @@ blink::WebFrame* HTMLFrame::createChildFrame( DCHECK(view_); // If we're local we have to have a view. // Create the view that will house the frame now. We embed once we know the // url (see decidePolicyForNavigation()). - mus::View* child_view = view_->connection()->CreateView(); + mojo::View* child_view = view_->connection()->CreateView(); ReplicatedFrameState child_state; child_state.name = frame_name; child_state.tree_scope = scope; @@ -320,7 +320,7 @@ blink::WebFrame* HTMLFrame::createChildFrame( params.allow_local_shared_frame = true; HTMLFrame* child_frame = GetLocalRoot()->delegate_->GetHTMLFactory()->CreateHTMLFrame(¶ms); - child_frame->owned_view_.reset(new mus::ScopedViewPtr(child_view)); + child_frame->owned_view_.reset(new mojo::ScopedViewPtr(child_view)); return child_frame->web_frame_; } @@ -494,7 +494,7 @@ web_view::FrameTreeServer* HTMLFrame::GetFrameTreeServer() { return frame_tree_manager_->local_root_->server_.get(); } -void HTMLFrame::SetView(mus::View* view) { +void HTMLFrame::SetView(mojo::View* view) { if (view_) view_->RemoveObserver(this); view_ = view; @@ -561,7 +561,7 @@ void HTMLFrame::SwapToRemote() { void HTMLFrame::SwapToLocal( HTMLFrameDelegate* delegate, - mus::View* view, + mojo::View* view, const mojo::Map<mojo::String, mojo::Array<uint8_t>>& properties) { CHECK(!IsLocal()); // It doesn't make sense for the root to swap to local. @@ -662,8 +662,8 @@ void HTMLFrame::OnViewInputEvent(View* view, const mojo::EventPtr& event) { web_widget->handleInputEvent(*web_event); } -void HTMLFrame::OnViewFocusChanged(mus::View* gained_focus, - mus::View* lost_focus) { +void HTMLFrame::OnViewFocusChanged(mojo::View* gained_focus, + mojo::View* lost_focus) { UpdateFocus(); } diff --git a/components/html_viewer/html_frame.h b/components/html_viewer/html_frame.h index 2b8c070..826299e 100644 --- a/components/html_viewer/html_frame.h +++ b/components/html_viewer/html_frame.h @@ -33,9 +33,6 @@ class WebWidget; namespace mojo { class ApplicationImpl; class Rect; -} - -namespace mus { class ScopedViewPtr; class View; } @@ -53,7 +50,7 @@ class WebLayerTreeViewImpl; // Frame is used to represent a single frame in the frame tree of a page. The // frame is either local or remote. Each Frame is associated with a single // HTMLFrameTreeManager and can not be moved to another HTMLFrameTreeManager. -// Local frames have a mus::View, remote frames do not. +// Local frames have a mojo::View, remote frames do not. // // HTMLFrame serves as the FrameTreeClient. It implements it by forwarding // the calls to HTMLFrameTreeManager so that HTMLFrameTreeManager can update @@ -68,14 +65,14 @@ class WebLayerTreeViewImpl; class HTMLFrame : public blink::WebFrameClient, public blink::WebRemoteFrameClient, public web_view::FrameTreeClient, - public mus::ViewObserver { + public mojo::ViewObserver { public: struct CreateParams { CreateParams( HTMLFrameTreeManager* manager, HTMLFrame* parent, uint32_t id, - mus::View* view, + mojo::View* view, const mojo::Map<mojo::String, mojo::Array<uint8_t>>& properties, HTMLFrameDelegate* delegate) : manager(manager), @@ -90,7 +87,7 @@ class HTMLFrame : public blink::WebFrameClient, HTMLFrameTreeManager* manager; HTMLFrame* parent; uint32_t id; - mus::View* view; + mojo::View* view; const mojo::Map<mojo::String, mojo::Array<uint8_t>>& properties; HTMLFrameDelegate* delegate; @@ -128,10 +125,10 @@ class HTMLFrame : public blink::WebFrameClient, blink::WebView* web_view(); blink::WebWidget* GetWebWidget(); - // The mus::View this frame renders to. This is non-null for the local frame + // The mojo::View this frame renders to. This is non-null for the local frame // the frame tree was created with as well as non-null for any frames created // locally. - mus::View* view() { return view_; } + mojo::View* view() { return view_; } HTMLFrameTreeManager* frame_tree_manager() { return frame_tree_manager_; } @@ -213,7 +210,7 @@ class HTMLFrame : public blink::WebFrameClient, // Gets the FrameTreeServer to use for this frame. web_view::FrameTreeServer* GetFrameTreeServer(); - void SetView(mus::View* view); + void SetView(mojo::View* view); // Creates the appropriate WebWidget implementation for the Frame. void CreateRootWebWidget(); @@ -228,7 +225,7 @@ class HTMLFrame : public blink::WebFrameClient, // Swaps this frame from a remote frame to a local frame. void SwapToLocal( HTMLFrameDelegate* delegate, - mus::View* view, + mojo::View* view, const mojo::Map<mojo::String, mojo::Array<uint8_t>>& properties); // Invoked when changing the delegate. This informs the new delegate to take @@ -244,14 +241,14 @@ class HTMLFrame : public blink::WebFrameClient, // The various frameDetached() implementations call into this. void FrameDetachedImpl(blink::WebFrame* web_frame); - // mus::ViewObserver methods: - void OnViewBoundsChanged(mus::View* view, + // mojo::ViewObserver methods: + void OnViewBoundsChanged(mojo::View* view, const mojo::Rect& old_bounds, const mojo::Rect& new_bounds) override; - void OnViewDestroyed(mus::View* view) override; - void OnViewInputEvent(mus::View* view, const mojo::EventPtr& event) override; - void OnViewFocusChanged(mus::View* gained_focus, - mus::View* lost_focus) override; + void OnViewDestroyed(mojo::View* view) override; + void OnViewInputEvent(mojo::View* view, const mojo::EventPtr& event) override; + void OnViewFocusChanged(mojo::View* gained_focus, + mojo::View* lost_focus) override; // web_view::FrameTreeClient: void OnConnect(web_view::FrameTreeServerPtr server, @@ -289,7 +286,7 @@ class HTMLFrame : public blink::WebFrameClient, HTMLFrame* parent_; // |view_| is non-null for local frames or remote frames that were once // local. - mus::View* view_; + mojo::View* view_; // The id for this frame. If there is a view, this is the same id as the // view has. const uint32_t id_; @@ -318,7 +315,7 @@ class HTMLFrame : public blink::WebFrameClient, // as long as the frame is valid). If the View was deleted as soon as the // frame was swapped to remote then the process rendering to the view would // be severed. - scoped_ptr<mus::ScopedViewPtr> owned_view_; + scoped_ptr<mojo::ScopedViewPtr> owned_view_; // This object is only valid in the context of performance tests. tracing::StartupPerformanceDataCollectorPtr diff --git a/components/html_viewer/html_frame_apptest.cc b/components/html_viewer/html_frame_apptest.cc index 8faca9c..ac144e5 100644 --- a/components/html_viewer/html_frame_apptest.cc +++ b/components/html_viewer/html_frame_apptest.cc @@ -24,7 +24,6 @@ #include "net/test/spawned_test_server/spawned_test_server.h" #include "third_party/mojo_services/src/accessibility/public/interfaces/accessibility.mojom.h" -using mus::ViewManagerTestBase; using web_view::Frame; using web_view::FrameConnection; using web_view::FrameTree; @@ -142,7 +141,7 @@ class HTMLFrameTest : public ViewManagerTestBase { // Creates the frame tree showing an empty page at the root and adds (via // script) a frame showing the same empty page. Frame* LoadEmptyPageAndCreateFrame() { - mus::View* embed_view = window_manager()->CreateView(); + View* embed_view = window_manager()->CreateView(); frame_tree_delegate_.reset( new TestFrameTreeDelegateImpl(application_impl())); FrameConnection* root_connection = @@ -195,8 +194,7 @@ class HTMLFrameTest : public ViewManagerTestBase { return request.Pass(); } - FrameConnection* InitFrameTree(mus::View* view, - const std::string& url_string) { + FrameConnection* InitFrameTree(View* view, const std::string& url_string) { frame_tree_delegate_.reset( new TestFrameTreeDelegateImpl(application_impl())); scoped_ptr<FrameConnection> frame_connection(new FrameConnection); @@ -252,7 +250,7 @@ class HTMLFrameTest : public ViewManagerTestBase { }; TEST_F(HTMLFrameTest, PageWithSingleFrame) { - mus::View* embed_view = window_manager()->CreateView(); + View* embed_view = window_manager()->CreateView(); FrameConnection* root_connection = InitFrameTree( embed_view, "http://127.0.0.1:%u/files/page_with_single_frame.html"); @@ -281,7 +279,7 @@ TEST_F(HTMLFrameTest, PageWithSingleFrame) { // Creates two frames. The parent navigates the child frame by way of changing // the location of the child frame. TEST_F(HTMLFrameTest, ChangeLocationOfChildFrame) { - mus::View* embed_view = window_manager()->CreateView(); + View* embed_view = window_manager()->CreateView(); ASSERT_TRUE(InitFrameTree( embed_view, "http://127.0.0.1:%u/files/page_with_single_frame.html")); diff --git a/components/html_viewer/html_frame_tree_manager.cc b/components/html_viewer/html_frame_tree_manager.cc index 07d026e..84a6ab9 100644 --- a/components/html_viewer/html_frame_tree_manager.cc +++ b/components/html_viewer/html_frame_tree_manager.cc @@ -68,7 +68,7 @@ HTMLFrameTreeManager::TreeMap* HTMLFrameTreeManager::instances_ = nullptr; // static HTMLFrame* HTMLFrameTreeManager::CreateFrameAndAttachToTree( GlobalState* global_state, - mus::View* view, + mojo::View* view, scoped_ptr<DocumentResourceWaiter> resource_waiter, HTMLFrameDelegate* delegate) { if (!instances_) @@ -209,7 +209,7 @@ HTMLFrameTreeManager::~HTMLFrameTreeManager() { void HTMLFrameTreeManager::Init( HTMLFrameDelegate* delegate, - mus::View* local_view, + mojo::View* local_view, const mojo::Array<web_view::FrameDataPtr>& frame_data, uint32_t change_id) { change_id_ = change_id; @@ -223,7 +223,7 @@ HTMLFrame* HTMLFrameTreeManager::BuildFrameTree( HTMLFrameDelegate* delegate, const mojo::Array<web_view::FrameDataPtr>& frame_data, uint32_t local_frame_id, - mus::View* local_view) { + mojo::View* local_view) { std::vector<HTMLFrame*> parents; HTMLFrame* root = nullptr; HTMLFrame* last_frame = nullptr; diff --git a/components/html_viewer/html_frame_tree_manager.h b/components/html_viewer/html_frame_tree_manager.h index bbd2d66..61ea86f 100644 --- a/components/html_viewer/html_frame_tree_manager.h +++ b/components/html_viewer/html_frame_tree_manager.h @@ -18,7 +18,7 @@ namespace blink { class WebView; } -namespace mus { +namespace mojo { class View; } @@ -34,7 +34,7 @@ class HTMLFrameTreeManagerObserver; // document. Some of the frames may be remote. HTMLFrameTreeManager updates its // state in response to changes from the FrameTreeServer, as well as changes // from the underlying frames. The frame tree has at least one local frame -// that is backed by a mus::View. +// that is backed by a mojo::View. class HTMLFrameTreeManager { public: // Returns a new HTMLFrame or null if a HTMLFrame does not need to be created. @@ -42,7 +42,7 @@ class HTMLFrameTreeManager { // Close() when done. static HTMLFrame* CreateFrameAndAttachToTree( GlobalState* global_state, - mus::View* view, + mojo::View* view, scoped_ptr<DocumentResourceWaiter> resource_waiter, HTMLFrameDelegate* delegate); @@ -71,7 +71,7 @@ class HTMLFrameTreeManager { ~HTMLFrameTreeManager(); void Init(HTMLFrameDelegate* delegate, - mus::View* local_view, + mojo::View* local_view, const mojo::Array<web_view::FrameDataPtr>& frame_data, uint32_t change_id); @@ -80,7 +80,7 @@ class HTMLFrameTreeManager { HTMLFrameDelegate* delegate, const mojo::Array<web_view::FrameDataPtr>& frame_data, uint32_t local_frame_id, - mus::View* local_view); + mojo::View* local_view); // Returns this HTMLFrameTreeManager from |instances_|. void RemoveFromInstances(); diff --git a/components/html_viewer/html_widget.cc b/components/html_viewer/html_widget.cc index aacfcac..2442657 100644 --- a/components/html_viewer/html_widget.cc +++ b/components/html_viewer/html_widget.cc @@ -33,7 +33,7 @@ scoped_ptr<WebLayerTreeViewImpl> CreateWebLayerTreeView( void InitializeWebLayerTreeView(WebLayerTreeViewImpl* web_layer_tree_view, mojo::ApplicationImpl* app, - mus::View* view, + mojo::View* view, blink::WebWidget* widget) { DCHECK(view); mojo::URLRequestPtr request(mojo::URLRequest::New()); @@ -43,7 +43,7 @@ void InitializeWebLayerTreeView(WebLayerTreeViewImpl* web_layer_tree_view, web_layer_tree_view->Initialize(gpu_service.Pass(), view, widget); } -void UpdateWebViewSizeFromViewSize(mus::View* view, +void UpdateWebViewSizeFromViewSize(mojo::View* view, blink::WebWidget* web_widget, WebLayerTreeViewImpl* web_layer_tree_view) { const gfx::Size size_in_pixels(view->bounds().width, view->bounds().height); @@ -81,13 +81,13 @@ blink::WebWidget* HTMLWidgetRootRemote::GetWidget() { return web_view_; } -void HTMLWidgetRootRemote::OnViewBoundsChanged(mus::View* view) {} +void HTMLWidgetRootRemote::OnViewBoundsChanged(mojo::View* view) {} // HTMLWidgetRootLocal -------------------------------------------------------- HTMLWidgetRootLocal::CreateParams::CreateParams(mojo::ApplicationImpl* app, GlobalState* global_state, - mus::View* view) + mojo::View* view) : app(app), global_state(global_state), view(view) {} HTMLWidgetRootLocal::CreateParams::~CreateParams() {} @@ -160,7 +160,7 @@ blink::WebWidget* HTMLWidgetRootLocal::GetWidget() { return web_view_; } -void HTMLWidgetRootLocal::OnViewBoundsChanged(mus::View* view) { +void HTMLWidgetRootLocal::OnViewBoundsChanged(mojo::View* view) { UpdateWebViewSizeFromViewSize(view, web_view_, web_layer_tree_view_impl_.get()); } @@ -169,7 +169,7 @@ void HTMLWidgetRootLocal::OnViewBoundsChanged(mus::View* view) { HTMLWidgetLocalRoot::HTMLWidgetLocalRoot(mojo::ApplicationImpl* app, GlobalState* global_state, - mus::View* view, + mojo::View* view, blink::WebLocalFrame* web_local_frame) : app_(app), global_state_(global_state), web_frame_widget_(nullptr) { web_frame_widget_ = blink::WebFrameWidget::create(this, web_local_frame); @@ -192,7 +192,7 @@ blink::WebWidget* HTMLWidgetLocalRoot::GetWidget() { return web_frame_widget_; } -void HTMLWidgetLocalRoot::OnViewBoundsChanged(mus::View* view) { +void HTMLWidgetLocalRoot::OnViewBoundsChanged(mojo::View* view) { UpdateWebViewSizeFromViewSize(view, web_frame_widget_, web_layer_tree_view_impl_.get()); } diff --git a/components/html_viewer/html_widget.h b/components/html_viewer/html_widget.h index 37074ce..6e26ea8 100644 --- a/components/html_viewer/html_widget.h +++ b/components/html_viewer/html_widget.h @@ -14,9 +14,6 @@ class WebFrameWidget; namespace mojo { class ApplicationImpl; -} - -namespace mus { class View; } @@ -34,7 +31,7 @@ class HTMLWidget { virtual blink::WebWidget* GetWidget() = 0; - virtual void OnViewBoundsChanged(mus::View* view) = 0; + virtual void OnViewBoundsChanged(mojo::View* view) = 0; }; // Used for the root frame when the root frame is remote. @@ -46,7 +43,7 @@ class HTMLWidgetRootRemote : public HTMLWidget { private: // HTMLWidget: blink::WebWidget* GetWidget() override; - void OnViewBoundsChanged(mus::View* view) override; + void OnViewBoundsChanged(mojo::View* view) override; blink::WebView* web_view_; @@ -60,12 +57,12 @@ class HTMLWidgetRootLocal : public HTMLWidget, public blink::WebViewClient { struct CreateParams { CreateParams(mojo::ApplicationImpl* app, GlobalState* global_state, - mus::View* view); + mojo::View* view); ~CreateParams(); mojo::ApplicationImpl* app; GlobalState* global_state; - mus::View* view; + mojo::View* view; }; HTMLWidgetRootLocal(CreateParams* create_params); @@ -88,11 +85,11 @@ class HTMLWidgetRootLocal : public HTMLWidget, public blink::WebViewClient { private: // HTMLWidget: blink::WebWidget* GetWidget() override; - void OnViewBoundsChanged(mus::View* view) override; + void OnViewBoundsChanged(mojo::View* view) override; mojo::ApplicationImpl* app_; GlobalState* global_state_; - mus::View* view_; + mojo::View* view_; blink::WebView* web_view_; scoped_ptr<WebLayerTreeViewImpl> web_layer_tree_view_impl_; scoped_ptr<ImeController> ime_controller_; @@ -105,14 +102,14 @@ class HTMLWidgetLocalRoot : public HTMLWidget, public blink::WebWidgetClient { public: HTMLWidgetLocalRoot(mojo::ApplicationImpl* app, GlobalState* global_state, - mus::View* view, + mojo::View* view, blink::WebLocalFrame* web_local_frame); ~HTMLWidgetLocalRoot() override; private: // HTMLWidget: blink::WebWidget* GetWidget() override; - void OnViewBoundsChanged(mus::View* view) override; + void OnViewBoundsChanged(mojo::View* view) override; // WebWidgetClient: virtual void initializeLayerTreeView(); diff --git a/components/html_viewer/ime_controller.cc b/components/html_viewer/ime_controller.cc index 9fe06b3..f0eb50b 100644 --- a/components/html_viewer/ime_controller.cc +++ b/components/html_viewer/ime_controller.cc @@ -12,8 +12,9 @@ namespace html_viewer { -ImeController::ImeController(mus::View* view, blink::WebWidget* widget) - : view_(view), widget_(widget) {} +ImeController::ImeController(mojo::View* view, blink::WebWidget* widget) + : view_(view), widget_(widget) { +} ImeController::~ImeController() {} diff --git a/components/html_viewer/ime_controller.h b/components/html_viewer/ime_controller.h index 24923ab..8c2917f 100644 --- a/components/html_viewer/ime_controller.h +++ b/components/html_viewer/ime_controller.h @@ -12,7 +12,7 @@ class WebGestureEvent; class WebWidget; } -namespace mus { +namespace mojo { class View; } @@ -22,7 +22,7 @@ namespace html_viewer { // handling IME related stuff. class ImeController { public: - ImeController(mus::View* view, blink::WebWidget* widget); + ImeController(mojo::View* view, blink::WebWidget* widget); ~ImeController(); // Methods called by WebWidget overrides. @@ -33,13 +33,13 @@ class ImeController { void ShowImeIfNeeded(); private: - // Update text input state from WebWidget to mus::View. If the focused + // Update text input state from WebWidget to mojo::View. If the focused // element is editable and |show_ime| is True, the software keyboard will be // shown. void UpdateTextInputState(bool show_ime); // Not owned objects. - mus::View* view_; + mojo::View* view_; blink::WebWidget* widget_; blink::WebTextInputInfo text_input_info_; diff --git a/components/html_viewer/web_layer_impl.cc b/components/html_viewer/web_layer_impl.cc index 0eb5335..345e1fa 100644 --- a/components/html_viewer/web_layer_impl.cc +++ b/components/html_viewer/web_layer_impl.cc @@ -30,13 +30,14 @@ void RequireCallback(cc::SurfaceId surface_id, } -WebLayerImpl::WebLayerImpl(mus::View* view, float device_pixel_ratio) - : cc_blink::WebLayerImpl( - cc::SurfaceLayer::Create(cc_blink::WebLayerImpl::LayerSettings(), - base::Bind(&SatisfyCallback), - base::Bind(&RequireCallback))), +WebLayerImpl::WebLayerImpl(mojo::View* view, float device_pixel_ratio) + : cc_blink::WebLayerImpl(cc::SurfaceLayer::Create( + cc_blink::WebLayerImpl::LayerSettings(), + base::Bind(&SatisfyCallback), + base::Bind(&RequireCallback))), view_(view), - device_pixel_ratio_(device_pixel_ratio) {} + device_pixel_ratio_(device_pixel_ratio) { +} WebLayerImpl::~WebLayerImpl() { } diff --git a/components/html_viewer/web_layer_impl.h b/components/html_viewer/web_layer_impl.h index e245d1f..779c69f 100644 --- a/components/html_viewer/web_layer_impl.h +++ b/components/html_viewer/web_layer_impl.h @@ -10,7 +10,7 @@ #include "cc/blink/web_layer_impl.h" #include "cc/layers/surface_layer.h" -namespace mus { +namespace mojo { class View; } @@ -18,14 +18,14 @@ namespace html_viewer { class WebLayerImpl : public cc_blink::WebLayerImpl { public: - WebLayerImpl(mus::View* view, float device_pixel_ratio); + WebLayerImpl(mojo::View* view, float device_pixel_ratio); ~WebLayerImpl() override; // WebLayer implementation. void setBounds(const blink::WebSize& bounds) override; private: - mus::View* view_; + mojo::View* view_; const float device_pixel_ratio_; scoped_refptr<cc::SurfaceLayer> layer_; diff --git a/components/html_viewer/web_layer_tree_view_impl.cc b/components/html_viewer/web_layer_tree_view_impl.cc index ef9d8c5..a1559af 100644 --- a/components/html_viewer/web_layer_tree_view_impl.cc +++ b/components/html_viewer/web_layer_tree_view_impl.cc @@ -58,7 +58,7 @@ WebLayerTreeViewImpl::WebLayerTreeViewImpl( } void WebLayerTreeViewImpl::Initialize(mojo::GpuPtr gpu_service, - mus::View* view, + mojo::View* view, blink::WebWidget* widget) { view_ = view; widget_ = widget; diff --git a/components/html_viewer/web_layer_tree_view_impl.h b/components/html_viewer/web_layer_tree_view_impl.h index b78b556..0817b9b 100644 --- a/components/html_viewer/web_layer_tree_view_impl.h +++ b/components/html_viewer/web_layer_tree_view_impl.h @@ -48,7 +48,7 @@ class WebLayerTreeViewImpl : public blink::WebLayerTreeView, ~WebLayerTreeViewImpl() override; void Initialize(mojo::GpuPtr gpu_service, - mus::View* view, + mojo::View* view, blink::WebWidget* widget); // cc::LayerTreeHostClient implementation. @@ -115,7 +115,7 @@ class WebLayerTreeViewImpl : public blink::WebLayerTreeView, private: // widget_ and view_ will outlive us. blink::WebWidget* widget_; - mus::View* view_; + mojo::View* view_; scoped_ptr<cc::LayerTreeHost> layer_tree_host_; scoped_ptr<cc::OutputSurface> output_surface_; scoped_refptr<base::SingleThreadTaskRunner> |