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

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

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 | « components/html_viewer/html_viewer.h ('k') | components/html_viewer/layout_test_html_viewer.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 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 <utility> 7 #include <utility>
8 8
9 #include "components/html_viewer/content_handler_impl.h" 9 #include "components/html_viewer/content_handler_impl.h"
10 #include "components/html_viewer/global_state.h" 10 #include "components/html_viewer/global_state.h"
11 #include "mojo/shell/public/cpp/application_connection.h" 11 #include "mojo/shell/public/cpp/connection.h"
12 12
13 namespace html_viewer { 13 namespace html_viewer {
14 14
15 HTMLViewer::HTMLViewer() : shell_(nullptr) { 15 HTMLViewer::HTMLViewer() : shell_(nullptr) {
16 } 16 }
17 17
18 HTMLViewer::~HTMLViewer() { 18 HTMLViewer::~HTMLViewer() {
19 } 19 }
20 20
21 void HTMLViewer::Initialize(mojo::Shell* shell, const std::string& url, 21 void HTMLViewer::Initialize(mojo::Shell* shell, const std::string& url,
22 uint32_t id) { 22 uint32_t id) {
23 shell_ = shell; 23 shell_ = shell;
24 global_state_.reset(new GlobalState(shell, url)); 24 global_state_.reset(new GlobalState(shell, url));
25 } 25 }
26 26
27 bool HTMLViewer::AcceptConnection( 27 bool HTMLViewer::AcceptConnection(mojo::Connection* connection) {
28 mojo::ApplicationConnection* connection) {
29 connection->AddService(this); 28 connection->AddService(this);
30 return true; 29 return true;
31 } 30 }
32 31
33 void HTMLViewer::Create( 32 void HTMLViewer::Create(
34 mojo::ApplicationConnection* connection, 33 mojo::Connection* connection,
35 mojo::InterfaceRequest<mojo::shell::mojom::ContentHandler> request) { 34 mojo::InterfaceRequest<mojo::shell::mojom::ContentHandler> request) {
36 new ContentHandlerImpl(global_state_.get(), shell_, std::move(request)); 35 new ContentHandlerImpl(global_state_.get(), shell_, std::move(request));
37 } 36 }
38 37
39 } // namespace html_viewer 38 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/html_viewer.h ('k') | components/html_viewer/layout_test_html_viewer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698