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

Side by Side Diff: mojo/shell/public/cpp/content_handler_factory.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
« no previous file with comments | « mojo/shell/public/cpp/connection.h ('k') | mojo/shell/public/cpp/interface_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_
6 #define MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" 10 #include "mojo/services/network/public/interfaces/url_loader.mojom.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void RunApplication( 47 void RunApplication(
48 InterfaceRequest<shell::mojom::Application> application_request, 48 InterfaceRequest<shell::mojom::Application> application_request,
49 URLResponsePtr response) override; 49 URLResponsePtr response) override;
50 }; 50 };
51 51
52 explicit ContentHandlerFactory(Delegate* delegate); 52 explicit ContentHandlerFactory(Delegate* delegate);
53 ~ContentHandlerFactory() override; 53 ~ContentHandlerFactory() override;
54 54
55 private: 55 private:
56 // From InterfaceFactory: 56 // From InterfaceFactory:
57 void Create(ApplicationConnection* connection, 57 void Create(Connection* connection,
58 InterfaceRequest<shell::mojom::ContentHandler> request) override; 58 InterfaceRequest<shell::mojom::ContentHandler> request) override;
59 59
60 Delegate* delegate_; 60 Delegate* delegate_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(ContentHandlerFactory); 62 DISALLOW_COPY_AND_ASSIGN(ContentHandlerFactory);
63 }; 63 };
64 64
65 template <class A> 65 template <class A>
66 class HandledApplicationHolderImpl 66 class HandledApplicationHolderImpl
67 : public ContentHandlerFactory::HandledApplicationHolder { 67 : public ContentHandlerFactory::HandledApplicationHolder {
68 public: 68 public:
69 explicit HandledApplicationHolderImpl(A* value) : value_(value) {} 69 explicit HandledApplicationHolderImpl(A* value) : value_(value) {}
70 70
71 private: 71 private:
72 scoped_ptr<A> value_; 72 scoped_ptr<A> value_;
73 }; 73 };
74 74
75 template <class A> 75 template <class A>
76 scoped_ptr<ContentHandlerFactory::HandledApplicationHolder> 76 scoped_ptr<ContentHandlerFactory::HandledApplicationHolder>
77 make_handled_factory_holder(A* value) { 77 make_handled_factory_holder(A* value) {
78 return make_scoped_ptr(new HandledApplicationHolderImpl<A>(value)); 78 return make_scoped_ptr(new HandledApplicationHolderImpl<A>(value));
79 } 79 }
80 80
81 } // namespace mojo 81 } // namespace mojo
82 82
83 #endif // MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_ 83 #endif // MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/connection.h ('k') | mojo/shell/public/cpp/interface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698