| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 struct WebContextMenuData; | 27 struct WebContextMenuData; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace gfx { | 30 namespace gfx { |
| 31 class Size; | 31 class Size; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace content { | 34 namespace content { |
| 35 | 35 |
| 36 class ContextMenuClient; | 36 class ContextMenuClient; |
| 37 class RenderFrame; |
| 37 class RenderViewVisitor; | 38 class RenderViewVisitor; |
| 38 struct ContextMenuParams; | 39 struct ContextMenuParams; |
| 39 struct SSLStatus; | 40 struct SSLStatus; |
| 40 | 41 |
| 41 class CONTENT_EXPORT RenderView : public IPC::Sender { | 42 class CONTENT_EXPORT RenderView : public IPC::Sender { |
| 42 public: | 43 public: |
| 43 // Returns the RenderView containing the given WebView. | 44 // Returns the RenderView containing the given WebView. |
| 44 static RenderView* FromWebView(blink::WebView* webview); | 45 static RenderView* FromWebView(blink::WebView* webview); |
| 45 | 46 |
| 46 // Returns the RenderView for the given routing ID. | 47 // Returns the RenderView for the given routing ID. |
| 47 static RenderView* FromRoutingID(int routing_id); | 48 static RenderView* FromRoutingID(int routing_id); |
| 48 | 49 |
| 49 // Visit all RenderViews with a live WebView (i.e., RenderViews that have | 50 // Visit all RenderViews with a live WebView (i.e., RenderViews that have |
| 50 // been closed but not yet destroyed are excluded). | 51 // been closed but not yet destroyed are excluded). |
| 51 static void ForEach(RenderViewVisitor* visitor); | 52 static void ForEach(RenderViewVisitor* visitor); |
| 52 | 53 |
| 54 // Returns the main RenderFrame. |
| 55 virtual RenderFrame* GetMainRenderFrame() = 0; |
| 56 |
| 53 // Get the routing ID of the view. | 57 // Get the routing ID of the view. |
| 54 virtual int GetRoutingID() const = 0; | 58 virtual int GetRoutingID() const = 0; |
| 55 | 59 |
| 56 // Page IDs allow the browser to identify pages in each renderer process for | 60 // Page IDs allow the browser to identify pages in each renderer process for |
| 57 // keeping back/forward history in sync. | 61 // keeping back/forward history in sync. |
| 58 // Note that this is NOT updated for every main frame navigation, only for | 62 // Note that this is NOT updated for every main frame navigation, only for |
| 59 // "regular" navigations that go into session history. In particular, client | 63 // "regular" navigations that go into session history. In particular, client |
| 60 // redirects, like the page cycler uses (document.location.href="foo") do not | 64 // redirects, like the page cycler uses (document.location.href="foo") do not |
| 61 // count as regular navigations and do not increment the page id. | 65 // count as regular navigations and do not increment the page id. |
| 62 virtual int GetPageId() const = 0; | 66 virtual int GetPageId() const = 0; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 173 |
| 170 private: | 174 private: |
| 171 // This interface should only be implemented inside content. | 175 // This interface should only be implemented inside content. |
| 172 friend class RenderViewImpl; | 176 friend class RenderViewImpl; |
| 173 RenderView() {} | 177 RenderView() {} |
| 174 }; | 178 }; |
| 175 | 179 |
| 176 } // namespace content | 180 } // namespace content |
| 177 | 181 |
| 178 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 182 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |