OLD | NEW |
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 #ifndef COMPONENTS_HTML_VIEWER_HTML_WIDGET_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_WIDGET_H_ |
6 #define COMPONENTS_HTML_VIEWER_HTML_WIDGET_H_ | 6 #define COMPONENTS_HTML_VIEWER_HTML_WIDGET_H_ |
7 | 7 |
8 #include "third_party/WebKit/public/web/WebViewClient.h" | 8 #include "third_party/WebKit/public/web/WebViewClient.h" |
9 #include "third_party/WebKit/public/web/WebWidgetClient.h" | 9 #include "third_party/WebKit/public/web/WebWidgetClient.h" |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 class HTMLWidget { | 31 class HTMLWidget { |
32 public: | 32 public: |
33 virtual ~HTMLWidget() {} | 33 virtual ~HTMLWidget() {} |
34 | 34 |
35 virtual blink::WebWidget* GetWidget() = 0; | 35 virtual blink::WebWidget* GetWidget() = 0; |
36 | 36 |
37 virtual void OnViewBoundsChanged(mus::View* view) = 0; | 37 virtual void OnViewBoundsChanged(mus::View* view) = 0; |
38 }; | 38 }; |
39 | 39 |
40 // Used for the root frame when the root frame is remote. | 40 // Used for the root frame when the root frame is remote. |
41 class HTMLWidgetRootRemote : public HTMLWidget { | 41 class HTMLWidgetRootRemote : public HTMLWidget, public blink::WebViewClient { |
42 public: | 42 public: |
43 HTMLWidgetRootRemote(); | 43 HTMLWidgetRootRemote(); |
44 ~HTMLWidgetRootRemote() override; | 44 ~HTMLWidgetRootRemote() override; |
45 | 45 |
46 private: | 46 private: |
| 47 // WebViewClient methods: |
| 48 virtual blink::WebStorageNamespace* createSessionStorageNamespace(); |
| 49 virtual bool allowsBrokenNullLayerTreeView() const; |
| 50 |
47 // HTMLWidget: | 51 // HTMLWidget: |
48 blink::WebWidget* GetWidget() override; | 52 blink::WebWidget* GetWidget() override; |
49 void OnViewBoundsChanged(mus::View* view) override; | 53 void OnViewBoundsChanged(mus::View* view) override; |
50 | 54 |
51 blink::WebView* web_view_; | 55 blink::WebView* web_view_; |
52 | 56 |
53 DISALLOW_COPY_AND_ASSIGN(HTMLWidgetRootRemote); | 57 DISALLOW_COPY_AND_ASSIGN(HTMLWidgetRootRemote); |
54 }; | 58 }; |
55 | 59 |
56 // Used for the root frame when the frame is local. If there is only one | 60 // Used for the root frame when the frame is local. If there is only one |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 blink::WebFrameWidget* web_frame_widget_; | 132 blink::WebFrameWidget* web_frame_widget_; |
129 scoped_ptr<WebLayerTreeViewImpl> web_layer_tree_view_impl_; | 133 scoped_ptr<WebLayerTreeViewImpl> web_layer_tree_view_impl_; |
130 scoped_ptr<ImeController> ime_controller_; | 134 scoped_ptr<ImeController> ime_controller_; |
131 | 135 |
132 DISALLOW_COPY_AND_ASSIGN(HTMLWidgetLocalRoot); | 136 DISALLOW_COPY_AND_ASSIGN(HTMLWidgetLocalRoot); |
133 }; | 137 }; |
134 | 138 |
135 } // namespace html_viewer | 139 } // namespace html_viewer |
136 | 140 |
137 #endif // COMPONENTS_HTML_VIEWER_HTML_WIDGET_H_ | 141 #endif // COMPONENTS_HTML_VIEWER_HTML_WIDGET_H_ |
OLD | NEW |