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

Side by Side Diff: components/plugins/renderer/webview_plugin.h

Issue 2733083004: Emit error events if the loading of an object element failed (Closed)
Patch Set: Emit error events if the loading of an object element failed Created 3 years, 8 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
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void updateVisibility(bool) override {} 98 void updateVisibility(bool) override {}
99 99
100 blink::WebInputEventResult handleInputEvent( 100 blink::WebInputEventResult handleInputEvent(
101 const blink::WebInputEvent& event, 101 const blink::WebInputEvent& event,
102 blink::WebCursorInfo& cursor_info) override; 102 blink::WebCursorInfo& cursor_info) override;
103 103
104 void didReceiveResponse(const blink::WebURLResponse& response) override; 104 void didReceiveResponse(const blink::WebURLResponse& response) override;
105 void didReceiveData(const char* data, int data_length) override; 105 void didReceiveData(const char* data, int data_length) override;
106 void didFinishLoading() override; 106 void didFinishLoading() override;
107 void didFailLoading(const blink::WebURLError& error) override; 107 void didFailLoading(const blink::WebURLError& error) override;
108 bool isPlaceholder() override;
109 void markAsErrorPlaceholder();
Bernhard Bauer 2017/03/28 10:55:59 These two methods are not overrides of WebPlugin,
George Joseph 2017/03/30 08:41:43 Done.
110 void unmarkAsErrorPlaceholder();
108 111
109 private: 112 private:
110 friend class base::DeleteHelper<WebViewPlugin>; 113 friend class base::DeleteHelper<WebViewPlugin>;
111 WebViewPlugin(content::RenderView* render_view, 114 WebViewPlugin(content::RenderView* render_view,
112 Delegate* delegate, 115 Delegate* delegate,
113 const content::WebPreferences& preferences); 116 const content::WebPreferences& preferences);
114 ~WebViewPlugin() override; 117 ~WebViewPlugin() override;
115 118
116 // content::RenderViewObserver methods: 119 // content::RenderViewObserver methods:
117 void OnDestruct() override {} 120 void OnDestruct() override {}
(...skipping 13 matching lines...) Expand all
131 gfx::Rect rect_; 134 gfx::Rect rect_;
132 135
133 blink::WebURLResponse response_; 136 blink::WebURLResponse response_;
134 std::list<std::string> data_; 137 std::list<std::string> data_;
135 std::unique_ptr<blink::WebURLError> error_; 138 std::unique_ptr<blink::WebURLError> error_;
136 blink::WebString old_title_; 139 blink::WebString old_title_;
137 bool finished_loading_; 140 bool finished_loading_;
138 bool focused_; 141 bool focused_;
139 bool is_painting_; 142 bool is_painting_;
140 bool is_resizing_; 143 bool is_resizing_;
144 bool placeholder = false;
Bernhard Bauer 2017/03/28 10:55:59 Member variables in Chromium style end with an und
George Joseph 2017/03/30 08:41:43 Done.
141 145
142 // A helper that handles interaction from WebViewPlugin's internal WebView. 146 // A helper that handles interaction from WebViewPlugin's internal WebView.
143 class WebViewHelper : public blink::WebViewClient, 147 class WebViewHelper : public blink::WebViewClient,
144 public blink::WebFrameClient { 148 public blink::WebFrameClient {
145 public: 149 public:
146 WebViewHelper(WebViewPlugin* plugin, 150 WebViewHelper(WebViewPlugin* plugin,
147 const content::WebPreferences& preferences); 151 const content::WebPreferences& preferences);
148 ~WebViewHelper() override; 152 ~WebViewHelper() override;
149 153
150 blink::WebView* web_view() { return web_view_; } 154 blink::WebView* web_view() { return web_view_; }
(...skipping 25 matching lines...) Expand all
176 // Owned by us, deleted via |close()|. 180 // Owned by us, deleted via |close()|.
177 blink::WebView* web_view_; 181 blink::WebView* web_view_;
178 }; 182 };
179 WebViewHelper web_view_helper_; 183 WebViewHelper web_view_helper_;
180 184
181 // Should be invalidated when destroy() is called. 185 // Should be invalidated when destroy() is called.
182 base::WeakPtrFactory<WebViewPlugin> weak_factory_; 186 base::WeakPtrFactory<WebViewPlugin> weak_factory_;
183 }; 187 };
184 188
185 #endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_ 189 #endif // COMPONENTS_PLUGINS_RENDERER_WEBVIEW_PLUGIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698