OLD | NEW |
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 #ifndef MOJO_EXAMPLES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ | 5 #ifndef MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ |
6 #define MOJO_EXAMPLES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ | 6 #define MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "mojo/public/cpp/application/lazy_interface_ptr.h" | 10 #include "mojo/public/cpp/application/lazy_interface_ptr.h" |
11 #include "mojo/public/interfaces/service_provider/service_provider.mojom.h" | 11 #include "mojo/public/interfaces/service_provider/service_provider.mojom.h" |
12 #include "mojo/services/public/cpp/view_manager/view_observer.h" | 12 #include "mojo/services/public/cpp/view_manager/view_observer.h" |
13 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h" | 13 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h" |
14 #include "mojo/services/public/interfaces/network/url_loader.mojom.h" | 14 #include "mojo/services/public/interfaces/network/url_loader.mojom.h" |
15 #include "third_party/WebKit/public/web/WebFrameClient.h" | 15 #include "third_party/WebKit/public/web/WebFrameClient.h" |
16 #include "third_party/WebKit/public/web/WebViewClient.h" | 16 #include "third_party/WebKit/public/web/WebViewClient.h" |
17 | 17 |
18 namespace mojo { | 18 namespace mojo { |
19 | 19 |
20 namespace view_manager { | 20 namespace view_manager { |
21 class Node; | 21 class Node; |
22 class ViewManager; | 22 class ViewManager; |
23 class View; | 23 class View; |
24 } | 24 } |
25 | 25 |
26 namespace examples { | |
27 | |
28 // A view for a single HTML document. | 26 // A view for a single HTML document. |
29 class HTMLDocumentView : public blink::WebViewClient, | 27 class HTMLDocumentView : public blink::WebViewClient, |
30 public blink::WebFrameClient, | 28 public blink::WebFrameClient, |
31 public view_manager::ViewObserver { | 29 public view_manager::ViewObserver { |
32 public: | 30 public: |
33 HTMLDocumentView(ServiceProvider* service_provider, | 31 HTMLDocumentView(ServiceProvider* service_provider, |
34 view_manager::ViewManager* view_manager); | 32 view_manager::ViewManager* view_manager); |
35 virtual ~HTMLDocumentView(); | 33 virtual ~HTMLDocumentView(); |
36 | 34 |
37 void AttachToNode(view_manager::Node* node); | 35 void AttachToNode(view_manager::Node* node); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 view_manager::ViewManager* view_manager_; | 68 view_manager::ViewManager* view_manager_; |
71 view_manager::View* view_; | 69 view_manager::View* view_; |
72 blink::WebView* web_view_; | 70 blink::WebView* web_view_; |
73 bool repaint_pending_; | 71 bool repaint_pending_; |
74 LazyInterfacePtr<navigation::NavigatorHost> navigator_host_; | 72 LazyInterfacePtr<navigation::NavigatorHost> navigator_host_; |
75 | 73 |
76 base::WeakPtrFactory<HTMLDocumentView> weak_factory_; | 74 base::WeakPtrFactory<HTMLDocumentView> weak_factory_; |
77 DISALLOW_COPY_AND_ASSIGN(HTMLDocumentView); | 75 DISALLOW_COPY_AND_ASSIGN(HTMLDocumentView); |
78 }; | 76 }; |
79 | 77 |
80 } // namespace examples | |
81 } // namespace mojo | 78 } // namespace mojo |
82 | 79 |
83 #endif // MOJO_EXAMPLES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ | 80 #endif // MOJO_SERVICES_HTML_VIEWER_HTML_DOCUMENT_VIEW_H_ |
OLD | NEW |