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

Side by Side Diff: content/public/browser/render_frame_host.h

Issue 1836973003: Move download messages from Renderer to Frame filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 // Roundtrips through the renderer and compositor pipeline to ensure that any 167 // Roundtrips through the renderer and compositor pipeline to ensure that any
168 // changes to the contents resulting from operations executed prior to this 168 // changes to the contents resulting from operations executed prior to this
169 // call are visible on screen. The call completes asynchronously by running 169 // call are visible on screen. The call completes asynchronously by running
170 // the supplied |callback| with a value of true upon successful completion and 170 // the supplied |callback| with a value of true upon successful completion and
171 // false otherwise (when the frame is destroyed, detached, etc..). 171 // false otherwise (when the frame is destroyed, detached, etc..).
172 typedef base::Callback<void(bool)> VisualStateCallback; 172 typedef base::Callback<void(bool)> VisualStateCallback;
173 virtual void InsertVisualStateCallback( 173 virtual void InsertVisualStateCallback(
174 const VisualStateCallback& callback) = 0; 174 const VisualStateCallback& callback) = 0;
175 175
176 // Copies the image at the location in viewport coordinates (not frame
177 // coordinates) to the clipboard. If there is no image at that location, does
178 // nothing.
179 virtual void CopyImageAt(int x, int y) = 0;
180
181 // Requests to save the image at the location in viewport coordinates (not
182 // frame coordinates). If there is an image at the location, the renderer
183 // will post back the appropriate download message to trigger the save UI.
184 // If there is no image at that location, does nothing.
185 virtual void SaveImageAt(int x, int y) = 0;
186
176 // RenderViewHost for this frame. 187 // RenderViewHost for this frame.
177 virtual RenderViewHost* GetRenderViewHost() = 0; 188 virtual RenderViewHost* GetRenderViewHost() = 0;
178 189
179 // Returns the ServiceRegistry for this frame. 190 // Returns the ServiceRegistry for this frame.
180 virtual ServiceRegistry* GetServiceRegistry() = 0; 191 virtual ServiceRegistry* GetServiceRegistry() = 0;
181 192
182 // Returns the visibility state of the frame. The different visibility states 193 // Returns the visibility state of the frame. The different visibility states
183 // of a frame are defined in Blink. 194 // of a frame are defined in Blink.
184 virtual blink::WebPageVisibilityState GetVisibilityState() = 0; 195 virtual blink::WebPageVisibilityState GetVisibilityState() = 0;
185 196
186 // Returns whether the RenderFrame in the renderer process has been created 197 // Returns whether the RenderFrame in the renderer process has been created
187 // and still has a connection. This is valid for all frames. 198 // and still has a connection. This is valid for all frames.
188 virtual bool IsRenderFrameLive() = 0; 199 virtual bool IsRenderFrameLive() = 0;
189 200
190 // Get the number of proxies to this frame, in all processes. Exposed for 201 // Get the number of proxies to this frame, in all processes. Exposed for
191 // use by resource metrics. 202 // use by resource metrics.
192 virtual int GetProxyCount() = 0; 203 virtual int GetProxyCount() = 0;
193 204
194 private: 205 private:
195 // This interface should only be implemented inside content. 206 // This interface should only be implemented inside content.
196 friend class RenderFrameHostImpl; 207 friend class RenderFrameHostImpl;
197 RenderFrameHost() {} 208 RenderFrameHost() {}
198 }; 209 };
199 210
200 } // namespace content 211 } // namespace content
201 212
202 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 213 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698