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

Unified Diff: mojo/services/html_viewer/html_viewer.cc

Issue 570623002: Revert "Compositor bindings for mojo html_viewer" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/services/html_viewer/html_document_view.cc ('k') | mojo/services/html_viewer/weblayertreeview_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/html_viewer.cc
diff --git a/mojo/services/html_viewer/html_viewer.cc b/mojo/services/html_viewer/html_viewer.cc
index 2a8e766679b01c982763bd01230c41718c61f38a..e8b5c76314bbf01afa43a1b6b037f18a495b866b 100644
--- a/mojo/services/html_viewer/html_viewer.cc
+++ b/mojo/services/html_viewer/html_viewer.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "base/message_loop/message_loop.h"
-#include "base/threading/thread.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_delegate.h"
@@ -21,9 +20,7 @@ class HTMLViewer;
class ContentHandlerImpl : public InterfaceImpl<ContentHandler> {
public:
- ContentHandlerImpl(Shell* shell,
- scoped_refptr<base::MessageLoopProxy> compositor_thread)
- : shell_(shell), compositor_thread_(compositor_thread) {}
+ explicit ContentHandlerImpl(Shell* shell) : shell_(shell) {}
virtual ~ContentHandlerImpl() {}
private:
@@ -32,51 +29,40 @@ class ContentHandlerImpl : public InterfaceImpl<ContentHandler> {
const mojo::String& url,
URLResponsePtr response,
InterfaceRequest<ServiceProvider> service_provider_request) OVERRIDE {
- new HTMLDocumentView(response.Pass(),
- service_provider_request.Pass(),
- shell_,
- compositor_thread_);
+ new HTMLDocumentView(
+ response.Pass(), service_provider_request.Pass(), shell_);
}
Shell* shell_;
- scoped_refptr<base::MessageLoopProxy> compositor_thread_;
DISALLOW_COPY_AND_ASSIGN(ContentHandlerImpl);
};
-class HTMLViewer : public ApplicationDelegate,
- public InterfaceFactory<ContentHandler> {
+class HTMLViewer : public ApplicationDelegate {
public:
- HTMLViewer() : compositor_thread_("compositor thread") {}
+ HTMLViewer() {}
virtual ~HTMLViewer() { blink::shutdown(); }
private:
// Overridden from ApplicationDelegate:
virtual void Initialize(ApplicationImpl* app) OVERRIDE {
- shell_ = app->shell();
+ content_handler_factory_.reset(
+ new InterfaceFactoryImplWithContext<ContentHandlerImpl, Shell>(
+ app->shell()));
blink_platform_impl_.reset(new BlinkPlatformImpl(app));
blink::initialize(blink_platform_impl_.get());
- compositor_thread_.Start();
}
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
OVERRIDE {
- connection->AddService(this);
+ connection->AddService(content_handler_factory_.get());
return true;
}
- // Overridden from InterfaceFactory<ContentHandler>
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<ContentHandler> request) OVERRIDE {
- BindToRequest(
- new ContentHandlerImpl(shell_, compositor_thread_.message_loop_proxy()),
- &request);
- }
-
scoped_ptr<BlinkPlatformImpl> blink_platform_impl_;
- Shell* shell_;
- base::Thread compositor_thread_;
+ scoped_ptr<InterfaceFactoryImplWithContext<ContentHandlerImpl, Shell> >
+ content_handler_factory_;
DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
};
« no previous file with comments | « mojo/services/html_viewer/html_document_view.cc ('k') | mojo/services/html_viewer/weblayertreeview_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698