diff options
author | ben <ben@chromium.org> | 2016-02-07 07:50:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-07 15:51:06 +0000 |
commit | dbcf6eba1c7f0aa1486ae8c2810402a9221d4bd7 (patch) | |
tree | 702996f0023d3ddecac69c46e21b4bdd83439c23 /mandoline/ui | |
parent | a770b8a5f0fbf1618824280808e18e768020d25b (diff) | |
download | chromium_src-dbcf6eba1c7f0aa1486ae8c2810402a9221d4bd7.zip chromium_src-dbcf6eba1c7f0aa1486ae8c2810402a9221d4bd7.tar.gz chromium_src-dbcf6eba1c7f0aa1486ae8c2810402a9221d4bd7.tar.bz2 |
Rename ApplicationDelegate to ShellClient.
ApplicationConnection -> Connection
TBR=rockot@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1675083002
Cr-Commit-Position: refs/heads/master@{#374054}
Diffstat (limited to 'mandoline/ui')
-rw-r--r-- | mandoline/ui/desktop_ui/browser_manager.cc | 5 | ||||
-rw-r--r-- | mandoline/ui/desktop_ui/browser_manager.h | 11 | ||||
-rw-r--r-- | mandoline/ui/desktop_ui/browser_window.cc | 2 | ||||
-rw-r--r-- | mandoline/ui/desktop_ui/browser_window.h | 6 | ||||
-rw-r--r-- | mandoline/ui/omnibox/omnibox_application.cc | 11 | ||||
-rw-r--r-- | mandoline/ui/omnibox/omnibox_application.h | 11 | ||||
-rw-r--r-- | mandoline/ui/phone_ui/phone_browser_application_delegate.cc | 8 | ||||
-rw-r--r-- | mandoline/ui/phone_ui/phone_browser_application_delegate.h | 11 |
8 files changed, 30 insertions, 35 deletions
diff --git a/mandoline/ui/desktop_ui/browser_manager.cc b/mandoline/ui/desktop_ui/browser_manager.cc index b3a5123..b43b18e 100644 --- a/mandoline/ui/desktop_ui/browser_manager.cc +++ b/mandoline/ui/desktop_ui/browser_manager.cc @@ -70,13 +70,12 @@ void BrowserManager::Initialize(mojo::Shell* shell, const std::string& url, CreateBrowser(GURL(kGoogleURL)); } -bool BrowserManager::AcceptConnection( - mojo::ApplicationConnection* connection) { +bool BrowserManager::AcceptConnection(mojo::Connection* connection) { connection->AddService<LaunchHandler>(this); return true; } -void BrowserManager::Create(mojo::ApplicationConnection* connection, +void BrowserManager::Create(mojo::Connection* connection, mojo::InterfaceRequest<LaunchHandler> request) { launch_handler_bindings_.AddBinding(this, std::move(request)); } diff --git a/mandoline/ui/desktop_ui/browser_manager.h b/mandoline/ui/desktop_ui/browser_manager.h index 77becea..aec4171 100644 --- a/mandoline/ui/desktop_ui/browser_manager.h +++ b/mandoline/ui/desktop_ui/browser_manager.h @@ -12,7 +12,7 @@ #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h" #include "mojo/common/weak_binding_set.h" #include "mojo/services/tracing/public/cpp/tracing_impl.h" -#include "mojo/shell/public/cpp/application_delegate.h" +#include "mojo/shell/public/cpp/shell_client.h" #include "url/gurl.h" namespace mojo { @@ -24,7 +24,7 @@ namespace mandoline { class BrowserWindow; // BrowserManager creates and manages the lifetime of Browsers. -class BrowserManager : public mojo::ApplicationDelegate, +class BrowserManager : public mojo::ShellClient, public LaunchHandler, public mojo::InterfaceFactory<LaunchHandler> { public: @@ -43,14 +43,13 @@ class BrowserManager : public mojo::ApplicationDelegate, // Overridden from LaunchHandler: void LaunchURL(const mojo::String& url) override; - // Overridden from mojo::ApplicationDelegate: + // Overridden from mojo::ShellClient: void Initialize(mojo::Shell* shell, const std::string& url, uint32_t id) override; - bool AcceptConnection( - mojo::ApplicationConnection* connection) override; + bool AcceptConnection(mojo::Connection* connection) override; // Overridden from mojo::InterfaceFactory<LaunchHandler>: - void Create(mojo::ApplicationConnection* connection, + void Create(mojo::Connection* connection, mojo::InterfaceRequest<LaunchHandler> request) override; mojo::Shell* shell_; diff --git a/mandoline/ui/desktop_ui/browser_window.cc b/mandoline/ui/desktop_ui/browser_window.cc index b87a604..a180220 100644 --- a/mandoline/ui/desktop_ui/browser_window.cc +++ b/mandoline/ui/desktop_ui/browser_window.cc @@ -391,7 +391,7 @@ void BrowserWindow::Embed(mojo::URLRequestPtr request) { //////////////////////////////////////////////////////////////////////////////// // BrowserWindow, mojo::InterfaceFactory<ViewEmbedder> implementation: -void BrowserWindow::Create(mojo::ApplicationConnection* connection, +void BrowserWindow::Create(mojo::Connection* connection, mojo::InterfaceRequest<ViewEmbedder> request) { view_embedder_bindings_.AddBinding(this, std::move(request)); } diff --git a/mandoline/ui/desktop_ui/browser_window.h b/mandoline/ui/desktop_ui/browser_window.h index 31d1880..08e7999 100644 --- a/mandoline/ui/desktop_ui/browser_window.h +++ b/mandoline/ui/desktop_ui/browser_window.h @@ -22,7 +22,7 @@ #include "url/gurl.h" namespace mojo { -class ApplicationConnection; +class Connection; class Shell; } @@ -101,7 +101,7 @@ class BrowserWindow : public mus::WindowTreeDelegate, void Embed(mojo::URLRequestPtr request) override; // Overridden from mojo::InterfaceFactory<ViewEmbedder>: - void Create(mojo::ApplicationConnection* connection, + void Create(mojo::Connection* connection, mojo::InterfaceRequest<ViewEmbedder> request) override; @@ -141,7 +141,7 @@ class BrowserWindow : public mus::WindowTreeDelegate, web_view::WebView web_view_; OmniboxPtr omnibox_; - scoped_ptr<mojo::ApplicationConnection> omnibox_connection_; + scoped_ptr<mojo::Connection> omnibox_connection_; DISALLOW_COPY_AND_ASSIGN(BrowserWindow); }; diff --git a/mandoline/ui/omnibox/omnibox_application.cc b/mandoline/ui/omnibox/omnibox_application.cc index 7674d0d..0ee9c5b 100644 --- a/mandoline/ui/omnibox/omnibox_application.cc +++ b/mandoline/ui/omnibox/omnibox_application.cc @@ -37,7 +37,7 @@ class OmniboxImpl : public mus::WindowTreeDelegate, public Omnibox { public: OmniboxImpl(mojo::Shell* shell, - mojo::ApplicationConnection* connection, + mojo::Connection* connection, mojo::InterfaceRequest<Omnibox> request); ~OmniboxImpl() override; @@ -81,7 +81,7 @@ OmniboxApplication::OmniboxApplication() : shell_(nullptr) {} OmniboxApplication::~OmniboxApplication() {} //////////////////////////////////////////////////////////////////////////////// -// OmniboxApplication, mojo::ApplicationDelegate implementation: +// OmniboxApplication, mojo::ShellClient implementation: void OmniboxApplication::Initialize(mojo::Shell* shell, const std::string& url, uint32_t id) { @@ -89,8 +89,7 @@ void OmniboxApplication::Initialize(mojo::Shell* shell, const std::string& url, tracing_.Initialize(shell, url); } -bool OmniboxApplication::AcceptConnection( - mojo::ApplicationConnection* connection) { +bool OmniboxApplication::AcceptConnection(mojo::Connection* connection) { connection->AddService<Omnibox>(this); return true; } @@ -98,7 +97,7 @@ bool OmniboxApplication::AcceptConnection( //////////////////////////////////////////////////////////////////////////////// // OmniboxApplication, mojo::InterfaceFactory<Omnibox> implementation: -void OmniboxApplication::Create(mojo::ApplicationConnection* connection, +void OmniboxApplication::Create(mojo::Connection* connection, mojo::InterfaceRequest<Omnibox> request) { new OmniboxImpl(shell_, connection, std::move(request)); } @@ -107,7 +106,7 @@ void OmniboxApplication::Create(mojo::ApplicationConnection* connection, // OmniboxImpl, public: OmniboxImpl::OmniboxImpl(mojo::Shell* shell, - mojo::ApplicationConnection* connection, + mojo::Connection* connection, mojo::InterfaceRequest<Omnibox> request) : shell_(shell), root_(nullptr), diff --git a/mandoline/ui/omnibox/omnibox_application.h b/mandoline/ui/omnibox/omnibox_application.h index 91df2a0..cb705c3 100644 --- a/mandoline/ui/omnibox/omnibox_application.h +++ b/mandoline/ui/omnibox/omnibox_application.h @@ -8,8 +8,8 @@ #include "base/macros.h" #include "mandoline/ui/desktop_ui/public/interfaces/omnibox.mojom.h" #include "mojo/services/tracing/public/cpp/tracing_impl.h" -#include "mojo/shell/public/cpp/application_delegate.h" #include "mojo/shell/public/cpp/interface_factory.h" +#include "mojo/shell/public/cpp/shell_client.h" namespace mojo { class Shell; @@ -17,21 +17,20 @@ class Shell; namespace mandoline { -class OmniboxApplication : public mojo::ApplicationDelegate, +class OmniboxApplication : public mojo::ShellClient, public mojo::InterfaceFactory<Omnibox> { public: OmniboxApplication(); ~OmniboxApplication() override; private: - // Overridden from mojo::ApplicationDelegate: + // Overridden from mojo::ShellClient: void Initialize(mojo::Shell* shell, const std::string& url, uint32_t id) override; - bool AcceptConnection( - mojo::ApplicationConnection* connection) override; + bool AcceptConnection(mojo::Connection* connection) override; // Overridden from mojo::InterfaceFactory<Omnibox>: - void Create(mojo::ApplicationConnection* connection, + void Create(mojo::Connection* connection, mojo::InterfaceRequest<Omnibox> request) override; mojo::Shell* shell_; diff --git a/mandoline/ui/phone_ui/phone_browser_application_delegate.cc b/mandoline/ui/phone_ui/phone_browser_application_delegate.cc index 666cafb..4cafb3c 100644 --- a/mandoline/ui/phone_ui/phone_browser_application_delegate.cc +++ b/mandoline/ui/phone_ui/phone_browser_application_delegate.cc @@ -10,7 +10,7 @@ #include "components/mus/public/cpp/window_tree_host_factory.h" #include "mojo/converters/geometry/geometry_type_converters.h" #include "mojo/services/network/public/interfaces/url_loader.mojom.h" -#include "mojo/shell/public/cpp/application_connection.h" +#include "mojo/shell/public/cpp/connection.h" #include "mojo/shell/public/cpp/shell.h" #include "ui/gfx/geometry/size.h" #include "url/gurl.h" @@ -34,7 +34,7 @@ PhoneBrowserApplicationDelegate::~PhoneBrowserApplicationDelegate() { } //////////////////////////////////////////////////////////////////////////////// -// PhoneBrowserApplicationDelegate, mojo::ApplicationDelegate implementation: +// PhoneBrowserApplicationDelegate, mojo::ShellClient implementation: void PhoneBrowserApplicationDelegate::Initialize(mojo::Shell* shell, const std::string& url, @@ -53,7 +53,7 @@ void PhoneBrowserApplicationDelegate::Initialize(mojo::Shell* shell, } bool PhoneBrowserApplicationDelegate::AcceptConnection( - mojo::ApplicationConnection* connection) { + mojo::Connection* connection) { connection->AddService<LaunchHandler>(this); return true; } @@ -127,7 +127,7 @@ void PhoneBrowserApplicationDelegate::TitleChanged(const mojo::String& title) { // mojo::InterfaceFactory<LaunchHandler> implementation: void PhoneBrowserApplicationDelegate::Create( - mojo::ApplicationConnection* connection, + mojo::Connection* connection, mojo::InterfaceRequest<LaunchHandler> request) { launch_handler_bindings_.AddBinding(this, request.Pass()); } diff --git a/mandoline/ui/phone_ui/phone_browser_application_delegate.h b/mandoline/ui/phone_ui/phone_browser_application_delegate.h index 6d85257..050c6d9 100644 --- a/mandoline/ui/phone_ui/phone_browser_application_delegate.h +++ b/mandoline/ui/phone_ui/phone_browser_application_delegate.h @@ -17,8 +17,8 @@ // TODO(beng): move this file somewhere common. #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h" #include "mojo/common/weak_binding_set.h" -#include "mojo/shell/public/cpp/application_delegate.h" #include "mojo/shell/public/cpp/interface_factory.h" +#include "mojo/shell/public/cpp/shell_client.h" namespace mus { class View; @@ -27,7 +27,7 @@ class View; namespace mandoline { class PhoneBrowserApplicationDelegate - : public mojo::ApplicationDelegate, + : public mojo::ShellClient, public LaunchHandler, public mus::WindowTreeDelegate, public mus::WindowObserver, @@ -38,11 +38,10 @@ class PhoneBrowserApplicationDelegate ~PhoneBrowserApplicationDelegate() override; private: - // Overridden from mojo::ApplicationDelegate: + // Overridden from mojo::ShellClient: void Initialize(mojo::Shell* shell, const std::string& url, uint32_t id) override; - bool AcceptConnection( - mojo::ApplicationConnection* connection) override; + bool AcceptConnection(mojo::Connection* connection) override; // Overridden from LaunchHandler: void LaunchURL(const mojo::String& url) override; @@ -70,7 +69,7 @@ class PhoneBrowserApplicationDelegate int32_t active_match_ordinal) override {} // Overridden from mojo::InterfaceFactory<LaunchHandler>: - void Create(mojo::ApplicationConnection* connection, + void Create(mojo::Connection* connection, mojo::InterfaceRequest<LaunchHandler> request) override; mojo::Shell* shell_; |