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

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

Issue 413353002: Remove extraneous namespaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/public/cpp/application/application_connection.h" 6 #include "mojo/public/cpp/application/application_connection.h"
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/public/cpp/application/interface_factory_with_context.h" 9 #include "mojo/public/cpp/application/interface_factory_with_context.h"
10 #include "mojo/services/html_viewer/blink_platform_impl.h" 10 #include "mojo/services/html_viewer/blink_platform_impl.h"
11 #include "mojo/services/html_viewer/html_document_view.h" 11 #include "mojo/services/html_viewer/html_document_view.h"
12 #include "mojo/services/public/cpp/view_manager/node.h" 12 #include "mojo/services/public/cpp/view_manager/node.h"
13 #include "mojo/services/public/cpp/view_manager/types.h" 13 #include "mojo/services/public/cpp/view_manager/types.h"
14 #include "mojo/services/public/cpp/view_manager/view.h" 14 #include "mojo/services/public/cpp/view_manager/view.h"
15 #include "mojo/services/public/cpp/view_manager/view_manager.h" 15 #include "mojo/services/public/cpp/view_manager/view_manager.h"
16 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h" 16 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
17 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h" 17 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
18 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h" 18 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
19 #include "third_party/WebKit/public/web/WebKit.h" 19 #include "third_party/WebKit/public/web/WebKit.h"
20 20
21 namespace mojo { 21 namespace mojo {
22 22
23 class HTMLViewer; 23 class HTMLViewer;
24 24
25 class NavigatorImpl : public InterfaceImpl<navigation::Navigator> { 25 class NavigatorImpl : public InterfaceImpl<Navigator> {
26 public: 26 public:
27 explicit NavigatorImpl(HTMLViewer* viewer) : viewer_(viewer) {} 27 explicit NavigatorImpl(HTMLViewer* viewer) : viewer_(viewer) {}
28 virtual ~NavigatorImpl() {} 28 virtual ~NavigatorImpl() {}
29 29
30 private: 30 private:
31 // Overridden from navigation::Navigator: 31 // Overridden from Navigator:
32 virtual void Navigate( 32 virtual void Navigate(
33 uint32_t node_id, 33 uint32_t node_id,
34 navigation::NavigationDetailsPtr navigation_details, 34 NavigationDetailsPtr navigation_details,
35 navigation::ResponseDetailsPtr response_details) OVERRIDE; 35 ResponseDetailsPtr response_details) OVERRIDE;
36 36
37 HTMLViewer* viewer_; 37 HTMLViewer* viewer_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); 39 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl);
40 }; 40 };
41 41
42 class HTMLViewer 42 class HTMLViewer
43 : public ApplicationDelegate, 43 : public ApplicationDelegate,
44 public view_manager::ViewManagerDelegate, 44 public view_manager::ViewManagerDelegate,
45 public InterfaceFactoryWithContext<NavigatorImpl, HTMLViewer> { 45 public InterfaceFactoryWithContext<NavigatorImpl, HTMLViewer> {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // TODO(darin): Figure out proper ownership of this instance. 100 // TODO(darin): Figure out proper ownership of this instance.
101 HTMLDocumentView* document_view_; 101 HTMLDocumentView* document_view_;
102 URLResponsePtr response_; 102 URLResponsePtr response_;
103 view_manager::ViewManagerClientFactory view_manager_client_factory_; 103 view_manager::ViewManagerClientFactory view_manager_client_factory_;
104 104
105 DISALLOW_COPY_AND_ASSIGN(HTMLViewer); 105 DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
106 }; 106 };
107 107
108 void NavigatorImpl::Navigate( 108 void NavigatorImpl::Navigate(
109 uint32_t node_id, 109 uint32_t node_id,
110 navigation::NavigationDetailsPtr navigation_details, 110 NavigationDetailsPtr navigation_details,
111 navigation::ResponseDetailsPtr response_details) { 111 ResponseDetailsPtr response_details) {
112 viewer_->Load(response_details->response.Pass()); 112 viewer_->Load(response_details->response.Pass());
113 } 113 }
114 114
115 // static 115 // static
116 ApplicationDelegate* ApplicationDelegate::Create() { 116 ApplicationDelegate* ApplicationDelegate::Create() {
117 return new HTMLViewer; 117 return new HTMLViewer;
118 } 118 }
119 119
120 } 120 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698