| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 class CONTENT_EXPORT RenderView : public IPC::Message::Sender { | 42 class CONTENT_EXPORT RenderView : public IPC::Message::Sender { |
| 43 public: | 43 public: |
| 44 // Returns the RenderView containing the given WebView. | 44 // Returns the RenderView containing the given WebView. |
| 45 static RenderView* FromWebView(WebKit::WebView* webview); | 45 static RenderView* FromWebView(WebKit::WebView* webview); |
| 46 | 46 |
| 47 // Visit all RenderViews with a live WebView (i.e., RenderViews that have | 47 // Visit all RenderViews with a live WebView (i.e., RenderViews that have |
| 48 // been closed but not yet destroyed are excluded). | 48 // been closed but not yet destroyed are excluded). |
| 49 static void ForEach(RenderViewVisitor* visitor); | 49 static void ForEach(RenderViewVisitor* visitor); |
| 50 | 50 |
| 51 virtual ~RenderView() {} | |
| 52 | |
| 53 // Get the routing ID of the view. | 51 // Get the routing ID of the view. |
| 54 virtual int GetRoutingID() const = 0; | 52 virtual int GetRoutingID() const = 0; |
| 55 | 53 |
| 56 // Page IDs allow the browser to identify pages in each renderer process for | 54 // Page IDs allow the browser to identify pages in each renderer process for |
| 57 // keeping back/forward history in sync. | 55 // keeping back/forward history in sync. |
| 58 // Note that this is NOT updated for every main frame navigation, only for | 56 // Note that this is NOT updated for every main frame navigation, only for |
| 59 // "regular" navigations that go into session history. In particular, client | 57 // "regular" navigations that go into session history. In particular, client |
| 60 // redirects, like the page cycler uses (document.location.href="foo") do not | 58 // redirects, like the page cycler uses (document.location.href="foo") do not |
| 61 // count as regular navigations and do not increment the page id. | 59 // count as regular navigations and do not increment the page id. |
| 62 virtual int GetPageId() const = 0; | 60 virtual int GetPageId() const = 0; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // Displays a modal alert dialog containing the given message. Returns | 121 // Displays a modal alert dialog containing the given message. Returns |
| 124 // once the user dismisses the dialog. | 122 // once the user dismisses the dialog. |
| 125 virtual void RunModalAlertDialog(WebKit::WebFrame* frame, | 123 virtual void RunModalAlertDialog(WebKit::WebFrame* frame, |
| 126 const WebKit::WebString& message) = 0; | 124 const WebKit::WebString& message) = 0; |
| 127 | 125 |
| 128 // The client should handle the navigation externally. | 126 // The client should handle the navigation externally. |
| 129 virtual void LoadURLExternally( | 127 virtual void LoadURLExternally( |
| 130 WebKit::WebFrame* frame, | 128 WebKit::WebFrame* frame, |
| 131 const WebKit::WebURLRequest& request, | 129 const WebKit::WebURLRequest& request, |
| 132 WebKit::WebNavigationPolicy policy) = 0; | 130 WebKit::WebNavigationPolicy policy) = 0; |
| 131 |
| 132 protected: |
| 133 virtual ~RenderView() {} |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 } // namespace content | 136 } // namespace content |
| 136 | 137 |
| 137 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 138 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |