Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: components/web_view/web_view_application_delegate.h

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_WEB_VIEW_WEB_VIEW_APPLICATION_DELEGATE_H_ 5 #ifndef COMPONENTS_WEB_VIEW_WEB_VIEW_APPLICATION_DELEGATE_H_
6 #define COMPONENTS_WEB_VIEW_WEB_VIEW_APPLICATION_DELEGATE_H_ 6 #define COMPONENTS_WEB_VIEW_WEB_VIEW_APPLICATION_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/web_view/public/interfaces/web_view.mojom.h" 9 #include "components/web_view/public/interfaces/web_view.mojom.h"
10 #include "mojo/common/weak_binding_set.h" 10 #include "mojo/common/weak_binding_set.h"
11 #include "mojo/services/tracing/public/cpp/tracing_impl.h" 11 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
12 #include "mojo/shell/public/cpp/application_delegate.h"
13 #include "mojo/shell/public/cpp/interface_factory.h" 12 #include "mojo/shell/public/cpp/interface_factory.h"
13 #include "mojo/shell/public/cpp/shell_client.h"
14 14
15 namespace web_view { 15 namespace web_view {
16 16
17 class WebViewApplicationDelegate 17 class WebViewApplicationDelegate
18 : public mojo::ApplicationDelegate, 18 : public mojo::ShellClient,
19 public mojom::WebViewFactory, 19 public mojom::WebViewFactory,
20 public mojo::InterfaceFactory<mojom::WebViewFactory> { 20 public mojo::InterfaceFactory<mojom::WebViewFactory> {
21 public: 21 public:
22 WebViewApplicationDelegate(); 22 WebViewApplicationDelegate();
23 ~WebViewApplicationDelegate() override; 23 ~WebViewApplicationDelegate() override;
24 24
25 private: 25 private:
26 // Overridden from mojo::ApplicationDelegate: 26 // Overridden from mojo::ShellClient:
27 void Initialize(mojo::Shell* shell, const std::string& url, 27 void Initialize(mojo::Shell* shell, const std::string& url,
28 uint32_t id) override; 28 uint32_t id) override;
29 bool AcceptConnection( 29 bool AcceptConnection(mojo::Connection* connection) override;
30 mojo::ApplicationConnection* connection) override;
31 30
32 // Overridden from mojom::WebViewFactory: 31 // Overridden from mojom::WebViewFactory:
33 void CreateWebView(mojom::WebViewClientPtr client, 32 void CreateWebView(mojom::WebViewClientPtr client,
34 mojo::InterfaceRequest<mojom::WebView> web_view) override; 33 mojo::InterfaceRequest<mojom::WebView> web_view) override;
35 34
36 // Overridden from mojo::InterfaceFactory<mojom::WebView>: 35 // Overridden from mojo::InterfaceFactory<mojom::WebView>:
37 void Create(mojo::ApplicationConnection* connection, 36 void Create(mojo::Connection* connection,
38 mojo::InterfaceRequest<mojom::WebViewFactory> request) override; 37 mojo::InterfaceRequest<mojom::WebViewFactory> request) override;
39 38
40 mojo::Shell* shell_; 39 mojo::Shell* shell_;
41 mojo::TracingImpl tracing_; 40 mojo::TracingImpl tracing_;
42 41
43 mojo::WeakBindingSet<WebViewFactory> factory_bindings_; 42 mojo::WeakBindingSet<WebViewFactory> factory_bindings_;
44 43
45 DISALLOW_COPY_AND_ASSIGN(WebViewApplicationDelegate); 44 DISALLOW_COPY_AND_ASSIGN(WebViewApplicationDelegate);
46 }; 45 };
47 46
48 } // namespace web_view 47 } // namespace web_view
49 48
50 #endif // COMPONENTS_WEB_VIEW_WEB_VIEW_APPLICATION_DELEGATE_H_ 49 #endif // COMPONENTS_WEB_VIEW_WEB_VIEW_APPLICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698