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

Side by Side Diff: components/html_viewer/html_viewer.cc

Issue 1239313004: More html_viewer OOPIF changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 5 years, 5 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 #include "components/html_viewer/html_viewer.h" 5 #include "components/html_viewer/html_viewer.h"
6 6
7 #include "components/html_viewer/content_handler_impl.h" 7 #include "components/html_viewer/content_handler_impl.h"
8 #include "components/html_viewer/global_state.h" 8 #include "components/html_viewer/global_state.h"
9 #include "mojo/application/public/cpp/application_connection.h" 9 #include "mojo/application/public/cpp/application_connection.h"
10 10
11
12 namespace html_viewer { 11 namespace html_viewer {
13 12
14 HTMLViewer::HTMLViewer() : app_(nullptr) { 13 HTMLViewer::HTMLViewer() : app_(nullptr) {
15 } 14 }
16 15
17 HTMLViewer::~HTMLViewer() { 16 HTMLViewer::~HTMLViewer() {
18 } 17 }
19 18
20 void HTMLViewer::Initialize(mojo::ApplicationImpl* app) { 19 void HTMLViewer::Initialize(mojo::ApplicationImpl* app) {
21 app_ = app; 20 app_ = app;
22 global_state_.reset(new GlobalState(app)); 21 global_state_.reset(new GlobalState(app));
23 } 22 }
24 23
25 bool HTMLViewer::ConfigureIncomingConnection( 24 bool HTMLViewer::ConfigureIncomingConnection(
26 mojo::ApplicationConnection* connection) { 25 mojo::ApplicationConnection* connection) {
27 connection->AddService(this); 26 connection->AddService(this);
28 return true; 27 return true;
29 } 28 }
30 29
31 void HTMLViewer::Create( 30 void HTMLViewer::Create(
32 mojo::ApplicationConnection* connection, 31 mojo::ApplicationConnection* connection,
33 mojo::InterfaceRequest<mojo::ContentHandler> request) { 32 mojo::InterfaceRequest<mojo::ContentHandler> request) {
34 new ContentHandlerImpl(global_state_.get(), app_, request.Pass()); 33 new ContentHandlerImpl(global_state_.get(), app_, request.Pass());
35 } 34 }
36 35
37 } // namespace html_viewer 36 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/html_frame_apptest.cc ('k') | components/html_viewer/public/interfaces/test_html_viewer.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698