diff options
86 files changed, 100 insertions, 106 deletions
diff --git a/components/clipboard/clipboard_application_delegate.cc b/components/clipboard/clipboard_application_delegate.cc index a182377..a7e91ba 100644 --- a/components/clipboard/clipboard_application_delegate.cc +++ b/components/clipboard/clipboard_application_delegate.cc @@ -19,7 +19,7 @@ void ClipboardApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { tracing_.Initialize(app); } -bool ClipboardApplicationDelegate::ConfigureIncomingConnection( +bool ClipboardApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService(this); return true; diff --git a/components/clipboard/clipboard_application_delegate.h b/components/clipboard/clipboard_application_delegate.h index f3f6c29..4cb6d57 100644 --- a/components/clipboard/clipboard_application_delegate.h +++ b/components/clipboard/clipboard_application_delegate.h @@ -26,7 +26,7 @@ class ClipboardApplicationDelegate // mojo::ApplicationDelegate implementation. void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // mojo::InterfaceFactory<mojo::Clipboard> implementation. diff --git a/components/devtools_service/devtools_service_delegate.cc b/components/devtools_service/devtools_service_delegate.cc index 5ba6adf..3989eb7 100644 --- a/components/devtools_service/devtools_service_delegate.cc +++ b/components/devtools_service/devtools_service_delegate.cc @@ -36,7 +36,7 @@ void DevToolsServiceDelegate::Initialize(mojo::ApplicationImpl* app) { service_.reset(new DevToolsService(app)); } -bool DevToolsServiceDelegate::ConfigureIncomingConnection( +bool DevToolsServiceDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<DevToolsRegistry>(this); diff --git a/components/devtools_service/devtools_service_delegate.h b/components/devtools_service/devtools_service_delegate.h index 966e90f2..d5f1d57 100644 --- a/components/devtools_service/devtools_service_delegate.h +++ b/components/devtools_service/devtools_service_delegate.h @@ -26,7 +26,7 @@ class DevToolsServiceDelegate private: // mojo::ApplicationDelegate implementation. void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; void Quit() override; diff --git a/components/filesystem/file_system_app.cc b/components/filesystem/file_system_app.cc index 81bc02a..662d2e2 100644 --- a/components/filesystem/file_system_app.cc +++ b/components/filesystem/file_system_app.cc @@ -22,7 +22,7 @@ void FileSystemApp::Initialize(mojo::ApplicationImpl* app) { tracing_.Initialize(app); } -bool FileSystemApp::ConfigureIncomingConnection( +bool FileSystemApp::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<FileSystem>(this); return true; @@ -37,7 +37,7 @@ void FileSystemApp::RegisterDirectoryToClient(DirectoryImpl* directory, client_mapping_.emplace_back(directory, std::move(client)); } -bool FileSystemApp::OnShellConnectionError() { +bool FileSystemApp::ShellConnectionLost() { if (client_mapping_.empty()) { // If we have no current connections, we can shutdown immediately. return true; diff --git a/components/filesystem/file_system_app.h b/components/filesystem/file_system_app.h index 75ce463..1eb1305 100644 --- a/components/filesystem/file_system_app.h +++ b/components/filesystem/file_system_app.h @@ -36,9 +36,9 @@ class FileSystemApp : public mojo::ApplicationDelegate, // |ApplicationDelegate| override: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; - bool OnShellConnectionError() override; + bool ShellConnectionLost() override; // |InterfaceFactory<Files>| implementation: void Create(mojo::ApplicationConnection* connection, diff --git a/components/font_service/font_service_app.cc b/components/font_service/font_service_app.cc index 74768a1..b2c3297 100644 --- a/components/font_service/font_service_app.cc +++ b/components/font_service/font_service_app.cc @@ -62,7 +62,7 @@ void FontServiceApp::Initialize(mojo::ApplicationImpl* app) { tracing_.Initialize(app); } -bool FontServiceApp::ConfigureIncomingConnection( +bool FontServiceApp::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService(this); return true; diff --git a/components/font_service/font_service_app.h b/components/font_service/font_service_app.h index 990f294..abdd0f1 100644 --- a/components/font_service/font_service_app.h +++ b/components/font_service/font_service_app.h @@ -27,7 +27,7 @@ class FontServiceApp : public mojo::ApplicationDelegate, private: // ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // mojo::InterfaceFactory<FontService>: diff --git a/components/html_viewer/html_document_application_delegate.cc b/components/html_viewer/html_document_application_delegate.cc index 1723408..96cc027 100644 --- a/components/html_viewer/html_document_application_delegate.cc +++ b/components/html_viewer/html_document_application_delegate.cc @@ -97,7 +97,7 @@ void HTMLDocumentApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { app_.ConnectToService("mojo:network_service", &url_loader_factory_); } -bool HTMLDocumentApplicationDelegate::ConfigureIncomingConnection( +bool HTMLDocumentApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { if (initial_response_) { OnResponseReceived(nullptr, mojo::URLLoaderPtr(), connection, nullptr, diff --git a/components/html_viewer/html_document_application_delegate.h b/components/html_viewer/html_document_application_delegate.h index a2264cb..e31e3b7 100644 --- a/components/html_viewer/html_document_application_delegate.h +++ b/components/html_viewer/html_document_application_delegate.h @@ -48,7 +48,7 @@ class HTMLDocumentApplicationDelegate : public mojo::ApplicationDelegate, // ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; void OnHTMLDocumentDeleted2(HTMLDocument* document); diff --git a/components/html_viewer/html_viewer.cc b/components/html_viewer/html_viewer.cc index a8616ba..0b59fe39 100644 --- a/components/html_viewer/html_viewer.cc +++ b/components/html_viewer/html_viewer.cc @@ -23,7 +23,7 @@ void HTMLViewer::Initialize(mojo::ApplicationImpl* app) { global_state_.reset(new GlobalState(app)); } -bool HTMLViewer::ConfigureIncomingConnection( +bool HTMLViewer::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService(this); return true; diff --git a/components/html_viewer/html_viewer.h b/components/html_viewer/html_viewer.h index 59563ea..0382196 100644 --- a/components/html_viewer/html_viewer.h +++ b/components/html_viewer/html_viewer.h @@ -30,7 +30,7 @@ class HTMLViewer : public mojo::ApplicationDelegate, private: // Overridden from ApplicationDelegate: - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // Overridden from InterfaceFactory<ContentHandler> diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc index b4995b1..0035075 100644 --- a/components/mus/mus_app.cc +++ b/components/mus/mus_app.cc @@ -90,7 +90,7 @@ void MandolineUIServicesApp::Initialize(ApplicationImpl* app) { tracing_.Initialize(app); } -bool MandolineUIServicesApp::ConfigureIncomingConnection( +bool MandolineUIServicesApp::AcceptConnection( ApplicationConnection* connection) { connection->AddService<Gpu>(this); connection->AddService<mojom::DisplayManager>(this); diff --git a/components/mus/mus_app.h b/components/mus/mus_app.h index 1585a4c..e300602 100644 --- a/components/mus/mus_app.h +++ b/components/mus/mus_app.h @@ -62,7 +62,7 @@ class MandolineUIServicesApp // ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // ConnectionManagerDelegate: diff --git a/components/mus/public/cpp/tests/window_server_test_base.cc b/components/mus/public/cpp/tests/window_server_test_base.cc index 2fa9c47..29dbd82 100644 --- a/components/mus/public/cpp/tests/window_server_test_base.cc +++ b/components/mus/public/cpp/tests/window_server_test_base.cc @@ -75,7 +75,7 @@ mojo::ApplicationDelegate* WindowServerTestBase::GetApplicationDelegate() { return this; } -bool WindowServerTestBase::ConfigureIncomingConnection( +bool WindowServerTestBase::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<mojom::WindowTreeClient>(this); return true; diff --git a/components/mus/public/cpp/tests/window_server_test_base.h b/components/mus/public/cpp/tests/window_server_test_base.h index 81b74ce..03e557f 100644 --- a/components/mus/public/cpp/tests/window_server_test_base.h +++ b/components/mus/public/cpp/tests/window_server_test_base.h @@ -67,7 +67,7 @@ class WindowServerTestBase mojo::ApplicationDelegate* GetApplicationDelegate() override; // ApplicationDelegate: - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // WindowTreeDelegate: diff --git a/components/mus/ws/window_tree_apptest.cc b/components/mus/ws/window_tree_apptest.cc index 72ebc2f..b51ac8a 100644 --- a/components/mus/ws/window_tree_apptest.cc +++ b/components/mus/ws/window_tree_apptest.cc @@ -595,7 +595,7 @@ class WindowTreeAppTest : public mojo::test::ApplicationTestBase, } // ApplicationDelegate implementation. - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService(client_factory_.get()); return true; } diff --git a/components/pdf_viewer/pdf_viewer.cc b/components/pdf_viewer/pdf_viewer.cc index b21c459..ce8e669 100644 --- a/components/pdf_viewer/pdf_viewer.cc +++ b/components/pdf_viewer/pdf_viewer.cc @@ -288,7 +288,7 @@ class PDFViewerApplicationDelegate } // ApplicationDelegate: - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override { connection->AddService<mus::mojom::WindowTreeClient>(this); return true; @@ -355,7 +355,7 @@ class PDFViewer : public mojo::ApplicationDelegate, tracing_.Initialize(app); } - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override { connection->AddService(this); return true; diff --git a/components/resource_provider/resource_provider_app.cc b/components/resource_provider/resource_provider_app.cc index 29cc400..f3e0ba5 100644 --- a/components/resource_provider/resource_provider_app.cc +++ b/components/resource_provider/resource_provider_app.cc @@ -25,7 +25,7 @@ void ResourceProviderApp::Initialize(mojo::ApplicationImpl* app) { tracing_.Initialize(app); } -bool ResourceProviderApp::ConfigureIncomingConnection( +bool ResourceProviderApp::AcceptConnection( mojo::ApplicationConnection* connection) { const base::FilePath app_path( GetPathForApplicationUrl(connection->GetRemoteApplicationURL())); @@ -41,7 +41,7 @@ void ResourceProviderApp::Create( mojo::InterfaceRequest<ResourceProvider> request) { const base::FilePath app_path( GetPathForApplicationUrl(connection->GetRemoteApplicationURL())); - // We validated path at ConfigureIncomingConnection() time, so it should still + // We validated path at AcceptConnection() time, so it should still // be valid. CHECK(!app_path.empty()); bindings_.AddBinding( diff --git a/components/resource_provider/resource_provider_app.h b/components/resource_provider/resource_provider_app.h index deeb218..81b2750 100644 --- a/components/resource_provider/resource_provider_app.h +++ b/components/resource_provider/resource_provider_app.h @@ -30,7 +30,7 @@ class ResourceProviderApp : public mojo::ApplicationDelegate, private: // ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // mojo::InterfaceFactory<ResourceProvider>: diff --git a/components/web_view/frame_apptest.cc b/components/web_view/frame_apptest.cc index 7ed0c13..7cfd7db 100644 --- a/components/web_view/frame_apptest.cc +++ b/components/web_view/frame_apptest.cc @@ -356,7 +356,7 @@ class FrameTest : public mojo::test::ApplicationTestBase, ApplicationDelegate* GetApplicationDelegate() override { return this; } // ApplicationDelegate implementation. - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override { connection->AddService<mus::mojom::WindowTreeClient>(this); connection->AddService<mojom::FrameClient>(this); diff --git a/components/web_view/test_runner/test_runner_application_delegate.cc b/components/web_view/test_runner/test_runner_application_delegate.cc index b4a8571..2ec1b08 100644 --- a/components/web_view/test_runner/test_runner_application_delegate.cc +++ b/components/web_view/test_runner/test_runner_application_delegate.cc @@ -71,7 +71,7 @@ void TestRunnerApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { mus::CreateWindowTreeHost(app_, this, &host_, nullptr); } -bool TestRunnerApplicationDelegate::ConfigureIncomingConnection( +bool TestRunnerApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<web_view::LayoutTestRunner>(this); return true; diff --git a/components/web_view/test_runner/test_runner_application_delegate.h b/components/web_view/test_runner/test_runner_application_delegate.h index a475ac7..dd0b33c 100644 --- a/components/web_view/test_runner/test_runner_application_delegate.h +++ b/components/web_view/test_runner/test_runner_application_delegate.h @@ -40,7 +40,7 @@ class TestRunnerApplicationDelegate // mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // mus::WindowTreeDelegate: diff --git a/components/web_view/web_view_application_delegate.cc b/components/web_view/web_view_application_delegate.cc index c6de155..d73aa78 100644 --- a/components/web_view/web_view_application_delegate.cc +++ b/components/web_view/web_view_application_delegate.cc @@ -19,7 +19,7 @@ void WebViewApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { tracing_.Initialize(app); } -bool WebViewApplicationDelegate::ConfigureIncomingConnection( +bool WebViewApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<mojom::WebViewFactory>(this); return true; diff --git a/components/web_view/web_view_application_delegate.h b/components/web_view/web_view_application_delegate.h index b06463a..52d6ea3 100644 --- a/components/web_view/web_view_application_delegate.h +++ b/components/web_view/web_view_application_delegate.h @@ -25,7 +25,7 @@ class WebViewApplicationDelegate private: // Overridden from mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // Overridden from mojom::WebViewFactory: diff --git a/content/common/mojo/mojo_shell_connection_impl.cc b/content/common/mojo/mojo_shell_connection_impl.cc index 0917cf7..96a151e 100644 --- a/content/common/mojo/mojo_shell_connection_impl.cc +++ b/content/common/mojo/mojo_shell_connection_impl.cc @@ -76,11 +76,11 @@ void MojoShellConnectionImpl::Initialize(mojo::ApplicationImpl* application) { initialized_ = true; } -bool MojoShellConnectionImpl::ConfigureIncomingConnection( +bool MojoShellConnectionImpl::AcceptConnection( mojo::ApplicationConnection* connection) { bool found = false; for (auto listener : listeners_) - found |= listener->ConfigureIncomingConnection(connection); + found |= listener->AcceptConnection(connection); return found; } diff --git a/content/common/mojo/mojo_shell_connection_impl.h b/content/common/mojo/mojo_shell_connection_impl.h index 470601c..60331e5 100644 --- a/content/common/mojo/mojo_shell_connection_impl.h +++ b/content/common/mojo/mojo_shell_connection_impl.h @@ -51,7 +51,7 @@ class MojoShellConnectionImpl : public MojoShellConnection, // mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* application) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // MojoShellConnection: diff --git a/content/public/common/mojo_shell_connection.h b/content/public/common/mojo_shell_connection.h index e42e3c0..62c9e3c 100644 --- a/content/public/common/mojo_shell_connection.h +++ b/content/public/common/mojo_shell_connection.h @@ -26,7 +26,7 @@ class CONTENT_EXPORT MojoShellConnection { // Override to add additional services to inbound connections. class Listener { public: - virtual bool ConfigureIncomingConnection( + virtual bool AcceptConnection( mojo::ApplicationConnection* connection) = 0; virtual ~Listener() {} diff --git a/content/public/test/test_mojo_app.cc b/content/public/test/test_mojo_app.cc index 488f8c1..bd929d6 100644 --- a/content/public/test/test_mojo_app.cc +++ b/content/public/test/test_mojo_app.cc @@ -24,7 +24,7 @@ void TestMojoApp::Initialize(mojo::ApplicationImpl* app) { app_ = app; } -bool TestMojoApp::ConfigureIncomingConnection( +bool TestMojoApp::AcceptConnection( mojo::ApplicationConnection* connection) { requestor_url_ = GURL(connection->GetRemoteApplicationURL()); connection->AddService<TestMojoService>(this); diff --git a/content/public/test/test_mojo_app.h b/content/public/test/test_mojo_app.h index 760645b..429afd8 100644 --- a/content/public/test/test_mojo_app.h +++ b/content/public/test/test_mojo_app.h @@ -28,7 +28,7 @@ class TestMojoApp : public mojo::ApplicationDelegate, private: // mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // mojo::InterfaceFactory<TestMojoService>: diff --git a/content/renderer/mus/render_widget_window_tree_client_factory.cc b/content/renderer/mus/render_widget_window_tree_client_factory.cc index 1451490..81fb0f7 100644 --- a/content/renderer/mus/render_widget_window_tree_client_factory.cc +++ b/content/renderer/mus/render_widget_window_tree_client_factory.cc @@ -37,7 +37,7 @@ class RenderWidgetWindowTreeClientFactoryImpl private: // MojoShellConnection::Listener implementation: - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override { connection->AddService<mojom::RenderWidgetWindowTreeClientFactory>(this); return true; diff --git a/device/devices_app/devices_app.cc b/device/devices_app/devices_app.cc index 0279629..eb5c01c 100644 --- a/device/devices_app/devices_app.cc +++ b/device/devices_app/devices_app.cc @@ -87,8 +87,7 @@ void DevicesApp::Initialize(mojo::ApplicationImpl* app) { StartIdleTimer(); } -bool DevicesApp::ConfigureIncomingConnection( - mojo::ApplicationConnection* connection) { +bool DevicesApp::AcceptConnection(mojo::ApplicationConnection* connection) { connection->AddService<usb::DeviceManager>(this); return true; } diff --git a/device/devices_app/devices_app.h b/device/devices_app/devices_app.h index 3c6a838..fb714f8 100644 --- a/device/devices_app/devices_app.h +++ b/device/devices_app/devices_app.h @@ -35,8 +35,7 @@ class DevicesApp : public mojo::ApplicationDelegate, // mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( - mojo::ApplicationConnection* connection) override; + bool AcceptConnection(mojo::ApplicationConnection* connection) override; void Quit() override; // mojo::InterfaceFactory<usb::DeviceManager>: diff --git a/mandoline/services/core_services/core_services_application_delegate.cc b/mandoline/services/core_services/core_services_application_delegate.cc index 6beb088..5540e74 100644 --- a/mandoline/services/core_services/core_services_application_delegate.cc +++ b/mandoline/services/core_services/core_services_application_delegate.cc @@ -102,7 +102,7 @@ void CoreServicesApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { tracing_.Initialize(app); } -bool CoreServicesApplicationDelegate::ConfigureIncomingConnection( +bool CoreServicesApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService(this); return true; diff --git a/mandoline/services/core_services/core_services_application_delegate.h b/mandoline/services/core_services/core_services_application_delegate.h index eeb40c4b..4398aec 100644 --- a/mandoline/services/core_services/core_services_application_delegate.h +++ b/mandoline/services/core_services/core_services_application_delegate.h @@ -34,7 +34,7 @@ class CoreServicesApplicationDelegate private: // Overridden from mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; void Quit() override; diff --git a/mandoline/services/updater/updater_app.cc b/mandoline/services/updater/updater_app.cc index 90f8b67..a9b1cd1 100644 --- a/mandoline/services/updater/updater_app.cc +++ b/mandoline/services/updater/updater_app.cc @@ -25,7 +25,7 @@ void UpdaterApp::Initialize(mojo::ApplicationImpl* app) { app_impl_ = app; } -bool UpdaterApp::ConfigureIncomingConnection( +bool UpdaterApp::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<Updater>(this); return true; diff --git a/mandoline/services/updater/updater_app.h b/mandoline/services/updater/updater_app.h index 21c8648..8c7ffd3 100644 --- a/mandoline/services/updater/updater_app.h +++ b/mandoline/services/updater/updater_app.h @@ -27,7 +27,7 @@ class UpdaterApp : public mojo::ApplicationDelegate, void Initialize(mojo::ApplicationImpl* app) override; // mojo::ApplicationDelegate: - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // InterfaceFactory<Updater> implementation. diff --git a/mandoline/ui/desktop_ui/browser_manager.cc b/mandoline/ui/desktop_ui/browser_manager.cc index cb54be1..d7bf354 100644 --- a/mandoline/ui/desktop_ui/browser_manager.cc +++ b/mandoline/ui/desktop_ui/browser_manager.cc @@ -68,7 +68,7 @@ void BrowserManager::Initialize(mojo::ApplicationImpl* app) { CreateBrowser(GURL(kGoogleURL)); } -bool BrowserManager::ConfigureIncomingConnection( +bool BrowserManager::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<LaunchHandler>(this); return true; diff --git a/mandoline/ui/desktop_ui/browser_manager.h b/mandoline/ui/desktop_ui/browser_manager.h index 754e548..57ab8de 100644 --- a/mandoline/ui/desktop_ui/browser_manager.h +++ b/mandoline/ui/desktop_ui/browser_manager.h @@ -47,7 +47,7 @@ class BrowserManager : public mojo::ApplicationDelegate, // Overridden from mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // Overridden from mojo::InterfaceFactory<LaunchHandler>: diff --git a/mandoline/ui/omnibox/omnibox_application.cc b/mandoline/ui/omnibox/omnibox_application.cc index 0479f4a..5293424 100644 --- a/mandoline/ui/omnibox/omnibox_application.cc +++ b/mandoline/ui/omnibox/omnibox_application.cc @@ -88,7 +88,7 @@ void OmniboxApplication::Initialize(mojo::ApplicationImpl* app) { tracing_.Initialize(app); } -bool OmniboxApplication::ConfigureIncomingConnection( +bool OmniboxApplication::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<Omnibox>(this); return true; diff --git a/mandoline/ui/omnibox/omnibox_application.h b/mandoline/ui/omnibox/omnibox_application.h index d98d8b4..f44ae98 100644 --- a/mandoline/ui/omnibox/omnibox_application.h +++ b/mandoline/ui/omnibox/omnibox_application.h @@ -26,7 +26,7 @@ class OmniboxApplication : public mojo::ApplicationDelegate, private: // Overridden from mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // Overridden from mojo::InterfaceFactory<Omnibox>: diff --git a/mandoline/ui/phone_ui/phone_browser_application_delegate.cc b/mandoline/ui/phone_ui/phone_browser_application_delegate.cc index d4413aa..de133ab 100644 --- a/mandoline/ui/phone_ui/phone_browser_application_delegate.cc +++ b/mandoline/ui/phone_ui/phone_browser_application_delegate.cc @@ -50,7 +50,7 @@ void PhoneBrowserApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { mus::CreateWindowTreeHost(app_, this, &host_, nullptr, nullptr); } -bool PhoneBrowserApplicationDelegate::ConfigureIncomingConnection( +bool PhoneBrowserApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<LaunchHandler>(this); return true; diff --git a/mandoline/ui/phone_ui/phone_browser_application_delegate.h b/mandoline/ui/phone_ui/phone_browser_application_delegate.h index 0aef775..6cb805f 100644 --- a/mandoline/ui/phone_ui/phone_browser_application_delegate.h +++ b/mandoline/ui/phone_ui/phone_browser_application_delegate.h @@ -40,7 +40,7 @@ class PhoneBrowserApplicationDelegate private: // Overridden from mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // Overridden from LaunchHandler: diff --git a/mash/browser_driver/browser_driver_application_delegate.cc b/mash/browser_driver/browser_driver_application_delegate.cc index bb683b8..aafac45 100644 --- a/mash/browser_driver/browser_driver_application_delegate.cc +++ b/mash/browser_driver/browser_driver_application_delegate.cc @@ -55,7 +55,7 @@ void BrowserDriverApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { AddAccelerators(); } -bool BrowserDriverApplicationDelegate::ConfigureIncomingConnection( +bool BrowserDriverApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { return true; } diff --git a/mash/browser_driver/browser_driver_application_delegate.h b/mash/browser_driver/browser_driver_application_delegate.h index 039eff4..94bbdd5 100644 --- a/mash/browser_driver/browser_driver_application_delegate.h +++ b/mash/browser_driver/browser_driver_application_delegate.h @@ -32,7 +32,7 @@ class BrowserDriverApplicationDelegate : public mojo::ApplicationDelegate, private: // mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // mus::mojom::AcceleratorHandler: diff --git a/mash/example/views_examples/views_examples_application_delegate.cc b/mash/example/views_examples/views_examples_application_delegate.cc index 092d6f0..4132e40 100644 --- a/mash/example/views_examples/views_examples_application_delegate.cc +++ b/mash/example/views_examples/views_examples_application_delegate.cc @@ -26,7 +26,7 @@ void ViewsExamplesApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { nullptr, nullptr); } -bool ViewsExamplesApplicationDelegate::ConfigureIncomingConnection( +bool ViewsExamplesApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { return false; } diff --git a/mash/example/views_examples/views_examples_application_delegate.h b/mash/example/views_examples/views_examples_application_delegate.h index 040343c..a464828 100644 --- a/mash/example/views_examples/views_examples_application_delegate.h +++ b/mash/example/views_examples/views_examples_application_delegate.h @@ -22,7 +22,7 @@ class ViewsExamplesApplicationDelegate : public mojo::ApplicationDelegate { private: // ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; mojo::TracingImpl tracing_; diff --git a/mash/example/window_type_launcher/window_type_launcher.cc b/mash/example/window_type_launcher/window_type_launcher.cc index dbf3802..dc88bd4 100644 --- a/mash/example/window_type_launcher/window_type_launcher.cc +++ b/mash/example/window_type_launcher/window_type_launcher.cc @@ -355,7 +355,7 @@ class WindowTypeLauncherView : public views::WidgetDelegateView, WindowTypeLauncher::WindowTypeLauncher() {} WindowTypeLauncher::~WindowTypeLauncher() {} -bool WindowTypeLauncher::ConfigureIncomingConnection( +bool WindowTypeLauncher::AcceptConnection( mojo::ApplicationConnection* connection) { return false; } diff --git a/mash/example/window_type_launcher/window_type_launcher.h b/mash/example/window_type_launcher/window_type_launcher.h index 6e91df8..d663262 100644 --- a/mash/example/window_type_launcher/window_type_launcher.h +++ b/mash/example/window_type_launcher/window_type_launcher.h @@ -21,7 +21,7 @@ class WindowTypeLauncher : public mojo::ApplicationDelegate { private: // ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; scoped_ptr<views::AuraInit> aura_init_; diff --git a/mash/shelf/shelf_application.cc b/mash/shelf/shelf_application.cc index f3567a6..ce67edc 100644 --- a/mash/shelf/shelf_application.cc +++ b/mash/shelf/shelf_application.cc @@ -46,7 +46,7 @@ void ShelfApplication::Initialize(mojo::ApplicationImpl* app) { widget->Show(); } -bool ShelfApplication::ConfigureIncomingConnection( +bool ShelfApplication::AcceptConnection( mojo::ApplicationConnection* connection) { return true; } diff --git a/mash/shelf/shelf_application.h b/mash/shelf/shelf_application.h index 901bdfa..d1ebe29 100644 --- a/mash/shelf/shelf_application.h +++ b/mash/shelf/shelf_application.h @@ -25,7 +25,7 @@ class ShelfApplication : public mojo::ApplicationDelegate { private: // mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; mojo::TracingImpl tracing_; diff --git a/mash/shell/shell_application_delegate.cc b/mash/shell/shell_application_delegate.cc index 1cb6e27..ec16135 100644 --- a/mash/shell/shell_application_delegate.cc +++ b/mash/shell/shell_application_delegate.cc @@ -25,7 +25,7 @@ void ShellApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { StartQuickLaunch(); } -bool ShellApplicationDelegate::ConfigureIncomingConnection( +bool ShellApplicationDelegate::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<mash::shell::mojom::Shell>(this); return true; diff --git a/mash/shell/shell_application_delegate.h b/mash/shell/shell_application_delegate.h index 03183f5b..e067393 100644 --- a/mash/shell/shell_application_delegate.h +++ b/mash/shell/shell_application_delegate.h @@ -34,7 +34,7 @@ class ShellApplicationDelegate private: // mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // mash::shell::mojom::Shell: diff --git a/mash/wm/window_manager_application.cc b/mash/wm/window_manager_application.cc index 8c514ed..1b26295 100644 --- a/mash/wm/window_manager_application.cc +++ b/mash/wm/window_manager_application.cc @@ -118,7 +118,7 @@ void WindowManagerApplication::Initialize(mojo::ApplicationImpl* app) { RootWindowController::CreateUsingWindowTreeHost(this)); } -bool WindowManagerApplication::ConfigureIncomingConnection( +bool WindowManagerApplication::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<mash::wm::mojom::UserWindowController>(this); connection->AddService<mus::mojom::AcceleratorRegistrar>(this); diff --git a/mash/wm/window_manager_application.h b/mash/wm/window_manager_application.h index ffe0603..19aca05 100644 --- a/mash/wm/window_manager_application.h +++ b/mash/wm/window_manager_application.h @@ -80,7 +80,7 @@ class WindowManagerApplication // ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override; - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // InterfaceFactory<mash::wm::mojom::UserWindowController>: diff --git a/media/mojo/services/mojo_media_application.cc b/media/mojo/services/mojo_media_application.cc index 08c025f..cac99e0 100644 --- a/media/mojo/services/mojo_media_application.cc +++ b/media/mojo/services/mojo_media_application.cc @@ -35,7 +35,7 @@ void MojoMediaApplication::Initialize(mojo::ApplicationImpl* app) { mojo_media_client_->Initialize(); } -bool MojoMediaApplication::ConfigureIncomingConnection( +bool MojoMediaApplication::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<interfaces::ServiceFactory>(this); return true; diff --git a/media/mojo/services/mojo_media_application.h b/media/mojo/services/mojo_media_application.h index 3adccca..03ef1c9 100644 --- a/media/mojo/services/mojo_media_application.h +++ b/media/mojo/services/mojo_media_application.h @@ -25,8 +25,7 @@ class MojoMediaApplication private: // mojo::ApplicationDelegate implementation. void Initialize(mojo::ApplicationImpl* app) final; - bool ConfigureIncomingConnection( - mojo::ApplicationConnection* connection) final; + bool AcceptConnection(mojo::ApplicationConnection* connection) final; // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation. void Create(mojo::ApplicationConnection* connection, diff --git a/mojo/public/cpp/bindings/tests/versioning_test_service.cc b/mojo/public/cpp/bindings/tests/versioning_test_service.cc index cd41541..1c6beb4 100644 --- a/mojo/public/cpp/bindings/tests/versioning_test_service.cc +++ b/mojo/public/cpp/bindings/tests/versioning_test_service.cc @@ -101,7 +101,7 @@ class HumanResourceSystemServer HumanResourceSystemServer() {} // ApplicationDelegate implementation. - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<HumanResourceDatabase>(this); return true; } diff --git a/mojo/services/network/network_service_delegate.cc b/mojo/services/network/network_service_delegate.cc index ef606fc..ea263e5 100644 --- a/mojo/services/network/network_service_delegate.cc +++ b/mojo/services/network/network_service_delegate.cc @@ -130,7 +130,7 @@ void NetworkServiceDelegate::Initialize(ApplicationImpl* app) { tracing_.Initialize(app); } -bool NetworkServiceDelegate::ConfigureIncomingConnection( +bool NetworkServiceDelegate::AcceptConnection( ApplicationConnection* connection) { DCHECK(context_); connection->AddService<CookieStore>(this); @@ -140,7 +140,7 @@ bool NetworkServiceDelegate::ConfigureIncomingConnection( return true; } -bool NetworkServiceDelegate::OnShellConnectionError() { +bool NetworkServiceDelegate::ShellConnectionLost() { EnsureIOThreadShutdown(); return true; } diff --git a/mojo/services/network/network_service_delegate.h b/mojo/services/network/network_service_delegate.h index 948795f..35d5580 100644 --- a/mojo/services/network/network_service_delegate.h +++ b/mojo/services/network/network_service_delegate.h @@ -45,8 +45,8 @@ class NetworkServiceDelegate : public ApplicationDelegate, // ApplicationDelegate implementation. void Initialize(ApplicationImpl* app) override; - bool ConfigureIncomingConnection(ApplicationConnection* connection) override; - bool OnShellConnectionError() override; + bool AcceptConnection(ApplicationConnection* connection) override; + bool ShellConnectionLost() override; void Quit() override; // InterfaceFactory<NetworkService> implementation. diff --git a/mojo/services/test_service/test_request_tracker_application.cc b/mojo/services/test_service/test_request_tracker_application.cc index d2cdbc9..b9179d2 100644 --- a/mojo/services/test_service/test_request_tracker_application.cc +++ b/mojo/services/test_service/test_request_tracker_application.cc @@ -26,7 +26,7 @@ void TestRequestTrackerApplication::Initialize(ApplicationImpl* app) { app_impl_ = app; } -bool TestRequestTrackerApplication::ConfigureIncomingConnection( +bool TestRequestTrackerApplication::AcceptConnection( ApplicationConnection* connection) { // Every instance of the service and recorder shares the context. // Note, this app is single-threaded, so this is thread safe. diff --git a/mojo/services/test_service/test_request_tracker_application.h b/mojo/services/test_service/test_request_tracker_application.h index ac07075..960f515 100644 --- a/mojo/services/test_service/test_request_tracker_application.h +++ b/mojo/services/test_service/test_request_tracker_application.h @@ -28,7 +28,7 @@ class TestRequestTrackerApplication void Initialize(ApplicationImpl* app) override; // ApplicationDelegate methods: - bool ConfigureIncomingConnection(ApplicationConnection* connection) override; + bool AcceptConnection(ApplicationConnection* connection) override; // InterfaceFactory<TestTimeService> methods: void Create(ApplicationConnection* connection, diff --git a/mojo/services/test_service/test_service_application.cc b/mojo/services/test_service/test_service_application.cc index a39cb2d..67b6515 100644 --- a/mojo/services/test_service/test_service_application.cc +++ b/mojo/services/test_service/test_service_application.cc @@ -27,7 +27,7 @@ void TestServiceApplication::Initialize(ApplicationImpl* app) { app_impl_ = app; } -bool TestServiceApplication::ConfigureIncomingConnection( +bool TestServiceApplication::AcceptConnection( ApplicationConnection* connection) { connection->AddService<TestService>(this); connection->AddService<TestTimeService>(this); diff --git a/mojo/services/test_service/test_service_application.h b/mojo/services/test_service/test_service_application.h index 42b476c..0d33950 100644 --- a/mojo/services/test_service/test_service_application.h +++ b/mojo/services/test_service/test_service_application.h @@ -26,7 +26,7 @@ class TestServiceApplication : public ApplicationDelegate, void Initialize(ApplicationImpl* app) override; // ApplicationDelegate implementation. - bool ConfigureIncomingConnection(ApplicationConnection* connection) override; + bool AcceptConnection(ApplicationConnection* connection) override; // InterfaceFactory<TestService> implementation. void Create(ApplicationConnection* connection, diff --git a/mojo/services/tracing/tracing_app.cc b/mojo/services/tracing/tracing_app.cc index 01e8dd5..13829b6 100644 --- a/mojo/services/tracing/tracing_app.cc +++ b/mojo/services/tracing/tracing_app.cc @@ -22,7 +22,7 @@ TracingApp::TracingApp() : collector_binding_(this), tracing_active_(false) { TracingApp::~TracingApp() { } -bool TracingApp::ConfigureIncomingConnection( +bool TracingApp::AcceptConnection( mojo::ApplicationConnection* connection) { connection->AddService<TraceCollector>(this); connection->AddService<StartupPerformanceDataCollector>(this); diff --git a/mojo/services/tracing/tracing_app.h b/mojo/services/tracing/tracing_app.h index 926c096..d7b19dc 100644 --- a/mojo/services/tracing/tracing_app.h +++ b/mojo/services/tracing/tracing_app.h @@ -33,7 +33,7 @@ class TracingApp private: // mojo::ApplicationDelegate implementation. - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override; // mojo::InterfaceFactory<TraceCollector> implementation. diff --git a/mojo/shell/application_manager_apptest.cc b/mojo/shell/application_manager_apptest.cc index 2defa40..aedc225 100644 --- a/mojo/shell/application_manager_apptest.cc +++ b/mojo/shell/application_manager_apptest.cc @@ -40,7 +40,7 @@ class ApplicationManagerAppTestDelegate private: // ApplicationDelegate: void Initialize(ApplicationImpl* app) override {} - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<CreateInstanceForHandleTest>(this); return true; } diff --git a/mojo/shell/application_manager_apptest_driver.cc b/mojo/shell/application_manager_apptest_driver.cc index e2d2ba1a..26d79b3 100644 --- a/mojo/shell/application_manager_apptest_driver.cc +++ b/mojo/shell/application_manager_apptest_driver.cc @@ -109,7 +109,7 @@ class TargetApplicationDelegate : public mojo::ApplicationDelegate, platform_channel_pair.PassServerHandle()); } - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override { connection->AddService<Driver>(this); return true; diff --git a/mojo/shell/application_manager_apptest_target.cc b/mojo/shell/application_manager_apptest_target.cc index 1402dbc..32a6b12 100644 --- a/mojo/shell/application_manager_apptest_target.cc +++ b/mojo/shell/application_manager_apptest_target.cc @@ -28,7 +28,7 @@ class TargetApplicationDelegate : public mojo::ApplicationDelegate { app->ConnectToService("mojo:mojo_shell_apptests", &service); service->SetTargetID(app->id()); } - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override { return true; } diff --git a/mojo/shell/application_manager_unittest.cc b/mojo/shell/application_manager_unittest.cc index cbc3107..cc52d65 100644 --- a/mojo/shell/application_manager_unittest.cc +++ b/mojo/shell/application_manager_unittest.cc @@ -120,7 +120,7 @@ class TestApplicationLoader : public ApplicationLoader, } // ApplicationDelegate implementation. - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<TestService>(this); last_requestor_url_ = GURL(connection->GetRemoteApplicationURL()); return true; @@ -349,7 +349,7 @@ class Tester : public ApplicationDelegate, app_.reset(new ApplicationImpl(this, std::move(application_request))); } - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { if (!requestor_url_.empty() && requestor_url_ != connection->GetRemoteApplicationURL()) { context_->set_tester_called_quit(); diff --git a/mojo/shell/application_package_apptest.cc b/mojo/shell/application_package_apptest.cc index 6c96c5a..657853c 100644 --- a/mojo/shell/application_package_apptest.cc +++ b/mojo/shell/application_package_apptest.cc @@ -53,7 +53,7 @@ class ProvidedApplicationDelegate private: // ApplicationDelegate: void Initialize(ApplicationImpl* app) override {} - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<test::mojom::ApplicationPackageApptestService>(this); return true; } @@ -99,7 +99,7 @@ class ApplicationPackageApptestDelegate private: // ApplicationDelegate: void Initialize(ApplicationImpl* app) override {} - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<ContentHandler>(this); connection->AddService<test::mojom::ApplicationPackageApptestService>(this); return true; diff --git a/mojo/shell/capability_filter_test.cc b/mojo/shell/capability_filter_test.cc index 7f384be..8f294dd 100644 --- a/mojo/shell/capability_filter_test.cc +++ b/mojo/shell/capability_filter_test.cc @@ -56,7 +56,7 @@ class ConnectionValidator : public ApplicationLoader, } // Overridden from ApplicationDelegate: - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<Validator>(this); return true; } @@ -123,7 +123,7 @@ class ServiceApplication : public ApplicationDelegate, // directly to the validator application. app_->ConnectToService("test:validator", &validator_); } - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { AddService<Safe>(connection); AddService<Unsafe>(connection); return true; @@ -166,7 +166,7 @@ TestApplication::~TestApplication() {} void TestApplication::Initialize(ApplicationImpl* app) { app_ = app; } -bool TestApplication::ConfigureIncomingConnection( +bool TestApplication::AcceptConnection( ApplicationConnection* connection) { // TestApplications receive their Validator via the inbound connection. connection->ConnectToService(&validator_); diff --git a/mojo/shell/capability_filter_test.h b/mojo/shell/capability_filter_test.h index 7ead2a97..9bef66a 100644 --- a/mojo/shell/capability_filter_test.h +++ b/mojo/shell/capability_filter_test.h @@ -29,7 +29,7 @@ class TestApplication : public ApplicationDelegate { private: // Overridden from ApplicationDelegate: void Initialize(ApplicationImpl* app) override; - bool ConfigureIncomingConnection(ApplicationConnection* connection) override; + bool AcceptConnection(ApplicationConnection* connection) override; void ConnectionClosed(const std::string& service_url); diff --git a/mojo/shell/fetcher/about_fetcher_unittest.cc b/mojo/shell/fetcher/about_fetcher_unittest.cc index 121393f..6eed303 100644 --- a/mojo/shell/fetcher/about_fetcher_unittest.cc +++ b/mojo/shell/fetcher/about_fetcher_unittest.cc @@ -43,7 +43,7 @@ class TestContentHandler : public ApplicationDelegate, private: // Overridden from ApplicationDelegate: void Initialize(ApplicationImpl* app) override {} - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<ContentHandler>(this); return true; } diff --git a/mojo/shell/package_manager/capability_filter_content_handler_unittest.cc b/mojo/shell/package_manager/capability_filter_content_handler_unittest.cc index 3a32a0f..96bf798 100644 --- a/mojo/shell/package_manager/capability_filter_content_handler_unittest.cc +++ b/mojo/shell/package_manager/capability_filter_content_handler_unittest.cc @@ -89,7 +89,7 @@ class TestContentHandler : public ApplicationDelegate, void Initialize(ApplicationImpl* app) override { app_ = app; } - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<ContentHandler>(this); return true; } diff --git a/mojo/shell/package_manager/content_handler_unittest.cc b/mojo/shell/package_manager/content_handler_unittest.cc index 657404a..06f4223 100644 --- a/mojo/shell/package_manager/content_handler_unittest.cc +++ b/mojo/shell/package_manager/content_handler_unittest.cc @@ -113,7 +113,7 @@ class TestApplicationLoader : public ApplicationLoader, } // ApplicationDelegate implementation. - bool ConfigureIncomingConnection(ApplicationConnection* connection) override { + bool AcceptConnection(ApplicationConnection* connection) override { connection->AddService<ContentHandler>(this); last_requestor_url_ = GURL(connection->GetRemoteApplicationURL()); return true; diff --git a/mojo/shell/public/cpp/application_connection.h b/mojo/shell/public/cpp/application_connection.h index 9c86c2b..28a3a85 100644 --- a/mojo/shell/public/cpp/application_connection.h +++ b/mojo/shell/public/cpp/application_connection.h @@ -19,7 +19,7 @@ namespace mojo { class ServiceConnector; // Represents a connection to another application. An instance of this class is -// passed to ApplicationDelegate's ConfigureIncomingConnection() method each +// passed to ApplicationDelegate's AcceptConnection() method each // time a connection is made to this app. // // To use, define a class that implements your specific service API (e.g., diff --git a/mojo/shell/public/cpp/application_delegate.h b/mojo/shell/public/cpp/application_delegate.h index 8725413..78211eb 100644 --- a/mojo/shell/public/cpp/application_delegate.h +++ b/mojo/shell/public/cpp/application_delegate.h @@ -27,14 +27,14 @@ class ApplicationDelegate { // Override this method to configure what services a connection supports when // being connected to from an app. // Return false to reject the connection entirely. - virtual bool ConfigureIncomingConnection(ApplicationConnection* connection); + virtual bool AcceptConnection(ApplicationConnection* connection); // Called when the shell connection has a connection error. // // Return true to shutdown the application. Return false to skip shutting // down the connection, but user is then required to call // ApplicationImpl::QuitNow() when done. - virtual bool OnShellConnectionError(); + virtual bool ShellConnectionLost(); // Called before ApplicationImpl::Terminate(). After returning from this call // the delegate can no longer rely on the main run loop still running. diff --git a/mojo/shell/public/cpp/lib/application_delegate.cc b/mojo/shell/public/cpp/lib/application_delegate.cc index 41fec6b..5519b84 100644 --- a/mojo/shell/public/cpp/lib/application_delegate.cc +++ b/mojo/shell/public/cpp/lib/application_delegate.cc @@ -14,12 +14,11 @@ ApplicationDelegate::~ApplicationDelegate() { void ApplicationDelegate::Initialize(ApplicationImpl* app) { } -bool ApplicationDelegate::ConfigureIncomingConnection( - ApplicationConnection* connection) { +bool ApplicationDelegate::AcceptConnection(ApplicationConnection* connection) { return true; } -bool ApplicationDelegate::OnShellConnectionError() { +bool ApplicationDelegate::ShellConnectionLost() { return true; } diff --git a/mojo/shell/public/cpp/lib/application_impl.cc b/mojo/shell/public/cpp/lib/application_impl.cc index 0c7e5ba..5c40fe6 100644 --- a/mojo/shell/public/cpp/lib/application_impl.cc +++ b/mojo/shell/public/cpp/lib/application_impl.cc @@ -126,7 +126,7 @@ void ApplicationImpl::AcceptConnection( scoped_ptr<ApplicationConnection> registry(new internal::ServiceRegistry( url, requestor_url, requestor_id, std::move(exposed_services), std::move(services), allowed_interfaces.To<std::set<std::string>>())); - if (!delegate_->ConfigureIncomingConnection(registry.get())) + if (!delegate_->AcceptConnection(registry.get())) return; // If we were quitting because we thought there were no more services for this @@ -153,7 +153,7 @@ void ApplicationImpl::OnConnectionError() { // shell connection errors other than immediate termination of the run // loop. The application might want to continue servicing connections other // than the one to the shell. - bool quit_now = delegate_->OnShellConnectionError(); + bool quit_now = delegate_->ShellConnectionLost(); if (quit_now) QuitNow(); if (!ptr) diff --git a/mojo/shell/runner/child/native_apptest_target.cc b/mojo/shell/runner/child/native_apptest_target.cc index b796bae..248685b 100644 --- a/mojo/shell/runner/child/native_apptest_target.cc +++ b/mojo/shell/runner/child/native_apptest_target.cc @@ -29,7 +29,7 @@ class TargetApplicationDelegate private: // mojo::ApplicationDelegate: void Initialize(mojo::ApplicationImpl* app) override {} - bool ConfigureIncomingConnection( + bool AcceptConnection( mojo::ApplicationConnection* connection) override { connection->AddService<mojo::shell::test::TestNativeService>(this); return true; diff --git a/mojo/shell/shell_application_delegate.cc b/mojo/shell/shell_application_delegate.cc index 66087b6..4b3efdd 100644 --- a/mojo/shell/shell_application_delegate.cc +++ b/mojo/shell/shell_application_delegate.cc @@ -22,7 +22,7 @@ ShellApplicationDelegate::ShellApplicationDelegate( ShellApplicationDelegate::~ShellApplicationDelegate() {} void ShellApplicationDelegate::Initialize(ApplicationImpl* app) {} -bool ShellApplicationDelegate::ConfigureIncomingConnection( +bool ShellApplicationDelegate::AcceptConnection( ApplicationConnection* connection) { connection->AddService<mojom::ApplicationManager>(this); return true; diff --git a/mojo/shell/shell_application_delegate.h b/mojo/shell/shell_application_delegate.h index fcc0ac6..6986bc3 100644 --- a/mojo/shell/shell_application_delegate.h +++ b/mojo/shell/shell_application_delegate.h @@ -29,7 +29,7 @@ class ShellApplicationDelegate private: // Overridden from ApplicationDelegate: void Initialize(ApplicationImpl* app) override; - bool ConfigureIncomingConnection(ApplicationConnection* connection) override; + bool AcceptConnection(ApplicationConnection* connection) override; // Overridden from InterfaceFactory<mojom::ApplicationManager>: void Create( diff --git a/mojo/shell/standalone/android/android_handler.cc b/mojo/shell/standalone/android/android_handler.cc index dbc41ad..6e3ad3c 100644 --- a/mojo/shell/standalone/android/android_handler.cc +++ b/mojo/shell/standalone/android/android_handler.cc @@ -167,8 +167,7 @@ void AndroidHandler::RunApplication( void AndroidHandler::Initialize(ApplicationImpl* app) {} -bool AndroidHandler::ConfigureIncomingConnection( - ApplicationConnection* connection) { +bool AndroidHandler::AcceptConnection(ApplicationConnection* connection) { connection->AddService(&content_handler_factory_); return true; } diff --git a/mojo/shell/standalone/android/android_handler.h b/mojo/shell/standalone/android/android_handler.h index 7df74fa..ac25ea1 100644 --- a/mojo/shell/standalone/android/android_handler.h +++ b/mojo/shell/standalone/android/android_handler.h @@ -28,7 +28,7 @@ class AndroidHandler : public ApplicationDelegate, private: // ApplicationDelegate: void Initialize(ApplicationImpl* app) override; - bool ConfigureIncomingConnection(ApplicationConnection* connection) override; + bool AcceptConnection(ApplicationConnection* connection) override; // ContentHandlerFactory::Delegate: void RunApplication(InterfaceRequest<Application> application_request, diff --git a/mojo/shell/standalone/test/pingable_app.cc b/mojo/shell/standalone/test/pingable_app.cc index c8116aa..bd92bd5 100644 --- a/mojo/shell/standalone/test/pingable_app.cc +++ b/mojo/shell/standalone/test/pingable_app.cc @@ -46,8 +46,7 @@ class PingableApp : public mojo::ApplicationDelegate, // ApplicationDelegate: void Initialize(ApplicationImpl* impl) override { app_url_ = impl->url(); } - bool ConfigureIncomingConnection( - mojo::ApplicationConnection* connection) override { + bool AcceptConnection(mojo::ApplicationConnection* connection) override { connection->AddService(this); return true; } |