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

Unified Diff: mojo/shell/public/cpp/content_handler_factory.h

Issue 1705323003: ContentHandler -> ShellClientFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delete
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/public/cpp/connection.h ('k') | mojo/shell/public/cpp/lib/connection_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/content_handler_factory.h
diff --git a/mojo/shell/public/cpp/content_handler_factory.h b/mojo/shell/public/cpp/content_handler_factory.h
deleted file mode 100644
index 9e3c5fff685bcd692e7926fd26d3f57ddc1e4533..0000000000000000000000000000000000000000
--- a/mojo/shell/public/cpp/content_handler_factory.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_
-#define MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_
-
-#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
-#include "mojo/shell/public/cpp/interface_factory.h"
-#include "mojo/shell/public/interfaces/content_handler.mojom.h"
-#include "mojo/shell/public/interfaces/shell.mojom.h"
-
-namespace mojo {
-
-class ContentHandlerFactory
- : public InterfaceFactory<shell::mojom::ContentHandler> {
- public:
- class HandledApplicationHolder {
- public:
- virtual ~HandledApplicationHolder() {}
- };
-
- class Delegate {
- public:
- virtual ~Delegate() {}
- // Implement this method to create the Application. This method will be
- // called on a new thread. Leaving this method will quit the application.
- virtual void RunApplication(
- InterfaceRequest<shell::mojom::ShellClient> request,
- URLResponsePtr response) = 0;
- };
-
- class ManagedDelegate : public Delegate {
- public:
- ~ManagedDelegate() override {}
- // Implement this method to create the Application for the given content.
- // This method will be called on a new thread. The application will be run
- // on this new thread, and the returned value will be kept alive until the
- // application ends.
- virtual scoped_ptr<HandledApplicationHolder> CreateApplication(
- InterfaceRequest<shell::mojom::ShellClient> request,
- URLResponsePtr response) = 0;
-
- private:
- void RunApplication(InterfaceRequest<shell::mojom::ShellClient> request,
- URLResponsePtr response) override;
- };
-
- explicit ContentHandlerFactory(Delegate* delegate);
- ~ContentHandlerFactory() override;
-
- private:
- // From InterfaceFactory:
- void Create(Connection* connection,
- InterfaceRequest<shell::mojom::ContentHandler> request) override;
-
- Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(ContentHandlerFactory);
-};
-
-template <class A>
-class HandledApplicationHolderImpl
- : public ContentHandlerFactory::HandledApplicationHolder {
- public:
- explicit HandledApplicationHolderImpl(A* value) : value_(value) {}
-
- private:
- scoped_ptr<A> value_;
-};
-
-template <class A>
-scoped_ptr<ContentHandlerFactory::HandledApplicationHolder>
-make_handled_factory_holder(A* value) {
- return make_scoped_ptr(new HandledApplicationHolderImpl<A>(value));
-}
-
-} // namespace mojo
-
-#endif // MOJO_SHELL_PUBLIC_CPP_CONTENT_HANDLER_FACTORY_H_
« no previous file with comments | « mojo/shell/public/cpp/connection.h ('k') | mojo/shell/public/cpp/lib/connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698