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

Side by Side Diff: mojo/services/html_viewer/html_viewer.cc

Issue 393983004: Move mojo/examples/html_viewer to mojo/services/html_viewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nuke 'examples' namespace Created 6 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 | Annotate | Revision Log
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 #include "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "mojo/examples/html_viewer/blink_platform_impl.h"
7 #include "mojo/examples/html_viewer/html_document_view.h"
8 #include "mojo/public/cpp/application/application_connection.h" 6 #include "mojo/public/cpp/application/application_connection.h"
9 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
10 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/services/html_viewer/blink_platform_impl.h"
10 #include "mojo/services/html_viewer/html_document_view.h"
11 #include "mojo/services/public/cpp/view_manager/node.h" 11 #include "mojo/services/public/cpp/view_manager/node.h"
12 #include "mojo/services/public/cpp/view_manager/types.h" 12 #include "mojo/services/public/cpp/view_manager/types.h"
13 #include "mojo/services/public/cpp/view_manager/view.h" 13 #include "mojo/services/public/cpp/view_manager/view.h"
14 #include "mojo/services/public/cpp/view_manager/view_manager.h" 14 #include "mojo/services/public/cpp/view_manager/view_manager.h"
15 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" 15 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
16 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h" 16 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
17 #include "third_party/WebKit/public/web/WebKit.h" 17 #include "third_party/WebKit/public/web/WebKit.h"
18 18
19 namespace mojo { 19 namespace mojo {
20 namespace examples {
21 20
22 class HTMLViewer; 21 class HTMLViewer;
23 22
24 class NavigatorImpl : public InterfaceImpl<navigation::Navigator> { 23 class NavigatorImpl : public InterfaceImpl<navigation::Navigator> {
25 public: 24 public:
26 explicit NavigatorImpl(ApplicationConnection* connection, 25 explicit NavigatorImpl(ApplicationConnection* connection,
27 HTMLViewer* viewer) : viewer_(viewer) {} 26 HTMLViewer* viewer) : viewer_(viewer) {}
28 virtual ~NavigatorImpl() {} 27 virtual ~NavigatorImpl() {}
29 28
30 private: 29 private:
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 HTMLDocumentView* document_view_; 94 HTMLDocumentView* document_view_;
96 URLResponsePtr response_; 95 URLResponsePtr response_;
97 96
98 DISALLOW_COPY_AND_ASSIGN(HTMLViewer); 97 DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
99 }; 98 };
100 99
101 void NavigatorImpl::Navigate( 100 void NavigatorImpl::Navigate(
102 uint32_t node_id, 101 uint32_t node_id,
103 navigation::NavigationDetailsPtr navigation_details, 102 navigation::NavigationDetailsPtr navigation_details,
104 navigation::ResponseDetailsPtr response_details) { 103 navigation::ResponseDetailsPtr response_details) {
105 printf("In HTMLViewer, rendering url: %s\n",
106 response_details->response->url.data());
107 viewer_->Load(response_details->response.Pass()); 104 viewer_->Load(response_details->response.Pass());
108 } 105 }
109 106
110 }
111
112 // static 107 // static
113 ApplicationDelegate* ApplicationDelegate::Create() { 108 ApplicationDelegate* ApplicationDelegate::Create() {
114 return new examples::HTMLViewer; 109 return new HTMLViewer;
115 } 110 }
116 111
117 } 112 }
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/html_document_view.cc ('k') | mojo/services/html_viewer/webmimeregistry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698