Chromium Code Reviews| 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 CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 struct WebPluginInfo; | 50 struct WebPluginInfo; |
| 51 struct WebPreferences; | 51 struct WebPreferences; |
| 52 | 52 |
| 53 // This interface wraps functionality, which is specific to frames, such as | 53 // This interface wraps functionality, which is specific to frames, such as |
| 54 // navigation. It provides communication with a corresponding RenderFrameHost | 54 // navigation. It provides communication with a corresponding RenderFrameHost |
| 55 // in the browser process. | 55 // in the browser process. |
| 56 class CONTENT_EXPORT RenderFrame : public IPC::Listener, | 56 class CONTENT_EXPORT RenderFrame : public IPC::Listener, |
| 57 public IPC::Sender { | 57 public IPC::Sender { |
| 58 public: | 58 public: |
| 59 // Returns the RenderFrame given a WebFrame. | 59 // Returns the RenderFrame given a WebFrame. |
| 60 static const RenderFrame* FromWebFrame(const blink::WebFrame* web_frame); | |
|
ncarter (slow)
2015/10/08 20:57:55
I appreciate the justification you gave for adding
Łukasz Anforowicz
2015/10/09 16:54:08
Done:
- Removed const-related changes
- Added a
| |
| 60 static RenderFrame* FromWebFrame(blink::WebFrame* web_frame); | 61 static RenderFrame* FromWebFrame(blink::WebFrame* web_frame); |
| 61 | 62 |
| 62 // Returns the RenderFrame given a routing id. | 63 // Returns the RenderFrame given a routing id. |
| 63 static RenderFrame* FromRoutingID(int routing_id); | 64 static RenderFrame* FromRoutingID(int routing_id); |
| 64 | 65 |
| 65 // Returns the RenderView associated with this frame. | 66 // Returns the RenderView associated with this frame. |
| 66 virtual RenderView* GetRenderView() = 0; | 67 virtual RenderView* GetRenderView() = 0; |
| 67 | 68 |
| 68 // Get the routing ID of the frame. | 69 // Get the routing ID of the frame. |
| 69 virtual int GetRoutingID() = 0; | 70 virtual int GetRoutingID() const = 0; |
|
ncarter (slow)
2015/10/08 20:57:55
Per the above, const methods in the content/public
Łukasz Anforowicz
2015/10/09 16:54:08
Done.
| |
| 70 | 71 |
| 71 // Returns the associated WebFrame. | 72 // Returns the associated WebFrame. |
| 72 virtual blink::WebLocalFrame* GetWebFrame() = 0; | 73 virtual blink::WebLocalFrame* GetWebFrame() = 0; |
| 73 | 74 |
| 74 // Gets the focused element. If no such element exists then | 75 // Gets the focused element. If no such element exists then |
| 75 // the element will be Null. | 76 // the element will be Null. |
| 76 virtual blink::WebElement GetFocusedElement() const = 0; | 77 virtual blink::WebElement GetFocusedElement() const = 0; |
| 77 | 78 |
| 78 // Gets WebKit related preferences associated with this frame. | 79 // Gets WebKit related preferences associated with this frame. |
| 79 virtual WebPreferences& GetWebkitPreferences() = 0; | 80 virtual WebPreferences& GetWebkitPreferences() = 0; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 | 164 |
| 164 private: | 165 private: |
| 165 // This interface should only be implemented inside content. | 166 // This interface should only be implemented inside content. |
| 166 friend class RenderFrameImpl; | 167 friend class RenderFrameImpl; |
| 167 RenderFrame() {} | 168 RenderFrame() {} |
| 168 }; | 169 }; |
| 169 | 170 |
| 170 } // namespace content | 171 } // namespace content |
| 171 | 172 |
| 172 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 173 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
| OLD | NEW |