OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ | 5 #ifndef COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ |
6 #define COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ | 6 #define COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 const blink::WebVector<blink::WebRect>& cut_outs_rects, | 101 const blink::WebVector<blink::WebRect>& cut_outs_rects, |
102 bool is_visible) override; | 102 bool is_visible) override; |
103 | 103 |
104 void updateFocus(bool foucsed, blink::WebFocusType focus_type) override; | 104 void updateFocus(bool foucsed, blink::WebFocusType focus_type) override; |
105 void updateVisibility(bool) override {} | 105 void updateVisibility(bool) override {} |
106 | 106 |
107 blink::WebInputEventResult handleInputEvent( | 107 blink::WebInputEventResult handleInputEvent( |
108 const blink::WebInputEvent& event, | 108 const blink::WebInputEvent& event, |
109 blink::WebCursorInfo& cursor_info) override; | 109 blink::WebCursorInfo& cursor_info) override; |
110 | 110 |
111 void didReceiveResponse(const blink::WebURLResponse& response) override; | 111 void didReceiveResponse(const blink::WebURLResponse& response) override {} |
112 void didReceiveData(const char* data, int data_length) override; | 112 void didReceiveData(const char* data, int data_length) override; |
113 void didFinishLoading() override; | 113 void didFinishLoading() override; |
114 void didFailLoading(const blink::WebURLError& error) override; | 114 void didFailLoading(const blink::WebURLError& error) override; |
115 | 115 |
116 // WebViewClient methods: | 116 // WebViewClient methods: |
117 bool acceptsLoadDrops() override; | 117 bool acceptsLoadDrops() override; |
118 | 118 |
119 void setToolTipText(const blink::WebString&, | 119 void setToolTipText(const blink::WebString&, |
120 blink::WebTextDirection) override; | 120 blink::WebTextDirection) override; |
121 | 121 |
122 void startDragging(blink::WebLocalFrame* frame, | 122 void startDragging(blink::WebLocalFrame* frame, |
123 const blink::WebDragData& drag_data, | 123 const blink::WebDragData& drag_data, |
124 blink::WebDragOperationsMask mask, | 124 blink::WebDragOperationsMask mask, |
125 const blink::WebImage& image, | 125 const blink::WebImage& image, |
126 const blink::WebPoint& point) override; | 126 const blink::WebPoint& point) override; |
127 | 127 |
128 // TODO(ojan): Remove this override and have this class use a non-null | 128 // TODO(ojan): Remove this override and have this class use a non-null |
129 // layerTreeView. | 129 // layerTreeView. |
130 bool allowsBrokenNullLayerTreeView() const override; | 130 bool allowsBrokenNullLayerTreeView() const override; |
131 | 131 |
132 // WebWidgetClient methods: | 132 // WebWidgetClient methods: |
133 void didInvalidateRect(const blink::WebRect&) override; | 133 void didInvalidateRect(const blink::WebRect&) override; |
134 void didChangeCursor(const blink::WebCursorInfo& cursor) override; | 134 void didChangeCursor(const blink::WebCursorInfo& cursor) override; |
135 void scheduleAnimation() override; | 135 void scheduleAnimation() override; |
136 | 136 |
137 // WebFrameClient methods: | 137 // WebFrameClient methods: |
138 void didClearWindowObject(blink::WebLocalFrame* frame) override; | 138 void didClearWindowObject(blink::WebLocalFrame* frame) override; |
139 | 139 |
140 // This method is defined in WebPlugin as well as in WebFrameClient, but with | |
Nate Chapin
2016/08/10 23:42:14
WebPlugin::didReceiveResponse and WebFrameClient::
| |
141 // different parameters. We only care about implementing the WebPlugin | |
142 // version, so we implement this method and call the default in WebFrameClient | |
143 // (which does nothing) to correctly overload it. | |
144 void didReceiveResponse(unsigned identifier, | |
145 const blink::WebURLResponse& response) override; | |
146 | |
147 private: | 140 private: |
148 friend class base::DeleteHelper<WebViewPlugin>; | 141 friend class base::DeleteHelper<WebViewPlugin>; |
149 WebViewPlugin(content::RenderView* render_view, | 142 WebViewPlugin(content::RenderView* render_view, |
150 Delegate* delegate, | 143 Delegate* delegate, |
151 const content::WebPreferences& preferences); | 144 const content::WebPreferences& preferences); |
152 ~WebViewPlugin() override; | 145 ~WebViewPlugin() override; |
153 | 146 |
154 // content::RenderViewObserver methods: | 147 // content::RenderViewObserver methods: |
155 void OnDestruct() override; | 148 void OnDestruct() override; |
156 void OnZoomLevelChanged() override; | 149 void OnZoomLevelChanged() override; |
(...skipping 12 matching lines...) Expand all Loading... | |
169 // Owned by us, deleted via |close()|. | 162 // Owned by us, deleted via |close()|. |
170 blink::WebView* web_view_; | 163 blink::WebView* web_view_; |
171 | 164 |
172 // Owned by us, deleted via |close()|. | 165 // Owned by us, deleted via |close()|. |
173 blink::WebFrameWidget* web_frame_widget_; | 166 blink::WebFrameWidget* web_frame_widget_; |
174 | 167 |
175 // Owned by us, deleted via |close()|. | 168 // Owned by us, deleted via |close()|. |
176 blink::WebFrame* web_frame_; | 169 blink::WebFrame* web_frame_; |
177 gfx::Rect rect_; | 170 gfx::Rect rect_; |
178 | 171 |
179 blink::WebURLResponse response_; | |
180 std::list<std::string> data_; | 172 std::list<std::string> data_; |
181 std::unique_ptr<blink::WebURLError> error_; | 173 std::unique_ptr<blink::WebURLError> error_; |
182 blink::WebString old_title_; | 174 blink::WebString old_title_; |
183 bool finished_loading_; | 175 bool finished_loading_; |
184 bool focused_; | 176 bool focused_; |
185 bool is_painting_; | 177 bool is_painting_; |
186 bool is_resizing_; | 178 bool is_resizing_; |
187 | 179 |
188 // Should be invalidated when destroy() is called. | 180 // Should be invalidated when destroy() is called. |
189 base::WeakPtrFactory<WebViewPlugin> weak_factory_; | 181 base::WeakPtrFactory<WebViewPlugin> weak_factory_; |
190 }; | 182 }; |
191 | 183 |
192 #endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ | 184 #endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ |
OLD | NEW |