| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ |
| 6 #define CHROME_RENDERER_RENDER_VIEW_H_ | 6 #define CHROME_RENDERER_RENDER_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "testing/gtest/include/gtest/gtest_prod.h" | 28 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 29 #include "webkit/api/public/WebConsoleMessage.h" | 29 #include "webkit/api/public/WebConsoleMessage.h" |
| 30 #include "webkit/glue/dom_serializer_delegate.h" | 30 #include "webkit/glue/dom_serializer_delegate.h" |
| 31 #include "webkit/glue/form_data.h" | 31 #include "webkit/glue/form_data.h" |
| 32 #include "webkit/glue/password_form_dom_manager.h" | 32 #include "webkit/glue/password_form_dom_manager.h" |
| 33 #include "webkit/glue/webaccessibilitymanager.h" | 33 #include "webkit/glue/webaccessibilitymanager.h" |
| 34 #include "webkit/glue/webview_delegate.h" | 34 #include "webkit/glue/webview_delegate.h" |
| 35 #include "webkit/glue/webview.h" | 35 #include "webkit/glue/webview.h" |
| 36 | 36 |
| 37 #if defined(OS_WIN) | 37 #if defined(OS_WIN) |
| 38 // RenderView is a diamond-shaped hierarchy, with WebWidgetDelegate at the root. | 38 // RenderView is a diamond-shaped hierarchy, with WebWidgetClient at the root. |
| 39 // VS warns when we inherit the WebWidgetDelegate method implementations from | 39 // VS warns when we inherit the WebWidgetClient method implementations from |
| 40 // RenderWidget. It's safe to ignore that warning. | 40 // RenderWidget. It's safe to ignore that warning. |
| 41 #pragma warning(disable: 4250) | 41 #pragma warning(disable: 4250) |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 class AudioMessageFilter; | 44 class AudioMessageFilter; |
| 45 class DictionaryValue; | 45 class DictionaryValue; |
| 46 class DevToolsAgent; | 46 class DevToolsAgent; |
| 47 class DevToolsClient; | 47 class DevToolsClient; |
| 48 class FilePath; | 48 class FilePath; |
| 49 class GURL; | 49 class GURL; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 virtual void DidFinishDocumentLoadForFrame(WebView* webview, WebFrame* frame); | 195 virtual void DidFinishDocumentLoadForFrame(WebView* webview, WebFrame* frame); |
| 196 virtual bool DidLoadResourceFromMemoryCache( | 196 virtual bool DidLoadResourceFromMemoryCache( |
| 197 WebView* webview, | 197 WebView* webview, |
| 198 const WebKit::WebURLRequest& request, | 198 const WebKit::WebURLRequest& request, |
| 199 const WebKit::WebURLResponse& response, | 199 const WebKit::WebURLResponse& response, |
| 200 WebFrame* frame); | 200 WebFrame* frame); |
| 201 virtual void DidHandleOnloadEventsForFrame(WebView* webview, WebFrame* frame); | 201 virtual void DidHandleOnloadEventsForFrame(WebView* webview, WebFrame* frame); |
| 202 virtual void DidChangeLocationWithinPageForFrame(WebView* webview, | 202 virtual void DidChangeLocationWithinPageForFrame(WebView* webview, |
| 203 WebFrame* frame, | 203 WebFrame* frame, |
| 204 bool is_new_navigation); | 204 bool is_new_navigation); |
| 205 virtual void DidContentsSizeChange(WebWidget* webwidget, | 205 virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget, |
| 206 int new_width, | 206 int new_width, |
| 207 int new_height); | 207 int new_height); |
| 208 | 208 |
| 209 virtual void DidCompleteClientRedirect(WebView* webview, | 209 virtual void DidCompleteClientRedirect(WebView* webview, |
| 210 WebFrame* frame, | 210 WebFrame* frame, |
| 211 const GURL& source); | 211 const GURL& source); |
| 212 virtual void WillCloseFrame(WebView* webview, WebFrame* frame); | 212 virtual void WillCloseFrame(WebView* webview, WebFrame* frame); |
| 213 virtual void WillSubmitForm(WebView* webview, WebFrame* frame, | 213 virtual void WillSubmitForm(WebView* webview, WebFrame* frame, |
| 214 const WebKit::WebForm& form); | 214 const WebKit::WebForm& form); |
| 215 virtual void WillSendRequest(WebView* webview, | 215 virtual void WillSendRequest(WebView* webview, |
| 216 uint32 identifier, | 216 uint32 identifier, |
| 217 WebKit::WebURLRequest* request); | 217 WebKit::WebURLRequest* request); |
| 218 | 218 |
| 219 virtual void WindowObjectCleared(WebFrame* webframe); | 219 virtual void WindowObjectCleared(WebFrame* webframe); |
| 220 virtual void DocumentElementAvailable(WebFrame* webframe); | 220 virtual void DocumentElementAvailable(WebFrame* webframe); |
| 221 virtual void DidCreateScriptContextForFrame(WebFrame* webframe); | 221 virtual void DidCreateScriptContextForFrame(WebFrame* webframe); |
| 222 virtual void DidDestroyScriptContextForFrame(WebFrame* webframe); | 222 virtual void DidDestroyScriptContextForFrame(WebFrame* webframe); |
| 223 virtual void DidCreateIsolatedScriptContext(WebFrame* webframe); | 223 virtual void DidCreateIsolatedScriptContext(WebFrame* webframe); |
| 224 | 224 |
| 225 virtual WindowOpenDisposition DispositionForNavigationAction( | 225 virtual WebKit::WebNavigationPolicy PolicyForNavigationAction( |
| 226 WebView* webview, | 226 WebView* webview, |
| 227 WebFrame* frame, | 227 WebFrame* frame, |
| 228 const WebKit::WebURLRequest& request, | 228 const WebKit::WebURLRequest& request, |
| 229 WebKit::WebNavigationType type, | 229 WebKit::WebNavigationType type, |
| 230 WindowOpenDisposition disposition, | 230 WebKit::WebNavigationPolicy default_policy, |
| 231 bool is_redirect); | 231 bool is_redirect); |
| 232 | 232 |
| 233 virtual WebView* CreateWebView(WebView* webview, | 233 virtual WebView* CreateWebView(WebView* webview, |
| 234 bool user_gesture, | 234 bool user_gesture, |
| 235 const GURL& creator_url); | 235 const GURL& creator_url); |
| 236 virtual WebWidget* CreatePopupWidget(WebView* webview, bool activatable); | 236 virtual WebKit::WebWidget* CreatePopupWidget( |
| 237 virtual WebWidget* CreatePopupWidgetWithInfo( | 237 WebView* webview, |
| 238 bool activatable); |
| 239 virtual WebKit::WebWidget* CreatePopupWidgetWithInfo( |
| 238 WebView* webview, | 240 WebView* webview, |
| 239 const WebKit::WebPopupMenuInfo& info); | 241 const WebKit::WebPopupMenuInfo& info); |
| 240 virtual WebPluginDelegate* CreatePluginDelegate( | 242 virtual WebPluginDelegate* CreatePluginDelegate( |
| 241 WebView* webview, | 243 WebView* webview, |
| 242 const GURL& url, | 244 const GURL& url, |
| 243 const std::string& mime_type, | 245 const std::string& mime_type, |
| 244 const std::string& clsid, | 246 const std::string& clsid, |
| 245 std::string* actual_mime_type); | 247 std::string* actual_mime_type); |
| 246 virtual WebKit::WebWorker* CreateWebWorker(WebKit::WebWorkerClient* client); | 248 virtual WebKit::WebWorker* CreateWebWorker(WebKit::WebWorkerClient* client); |
| 247 virtual WebKit::WebMediaPlayer* CreateWebMediaPlayer( | 249 virtual WebKit::WebMediaPlayer* CreateWebMediaPlayer( |
| 248 WebKit::WebMediaPlayerClient* client); | 250 WebKit::WebMediaPlayerClient* client); |
| 249 virtual void OnMissingPluginStatus(WebPluginDelegate* delegate, int status); | 251 virtual void OnMissingPluginStatus(WebPluginDelegate* delegate, int status); |
| 250 virtual void OpenURL(WebView* webview, const GURL& url, | 252 virtual void OpenURL(WebView* webview, const GURL& url, |
| 251 const GURL& referrer, | 253 const GURL& referrer, |
| 252 WindowOpenDisposition disposition); | 254 WebKit::WebNavigationPolicy policy); |
| 253 virtual void DidDownloadImage(int id, | 255 virtual void DidDownloadImage(int id, |
| 254 const GURL& image_url, | 256 const GURL& image_url, |
| 255 bool errored, | 257 bool errored, |
| 256 const SkBitmap& image); | 258 const SkBitmap& image); |
| 257 virtual GURL GetAlternateErrorPageURL(const GURL& failedURL, | 259 virtual GURL GetAlternateErrorPageURL(const GURL& failedURL, |
| 258 ErrorPageType error_type); | 260 ErrorPageType error_type); |
| 259 | 261 |
| 260 virtual void ShowContextMenu(WebView* webview, | 262 virtual void ShowContextMenu(WebView* webview, |
| 261 ContextNode node, | 263 ContextNode node, |
| 262 int x, | 264 int x, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 296 |
| 295 virtual void PasteFromSelectionClipboard(); | 297 virtual void PasteFromSelectionClipboard(); |
| 296 | 298 |
| 297 virtual void ReportFindInPageMatchCount(int count, int request_id, | 299 virtual void ReportFindInPageMatchCount(int count, int request_id, |
| 298 bool final_update); | 300 bool final_update); |
| 299 virtual void ReportFindInPageSelection(int request_id, | 301 virtual void ReportFindInPageSelection(int request_id, |
| 300 int active_match_ordinal, | 302 int active_match_ordinal, |
| 301 const WebKit::WebRect& selection); | 303 const WebKit::WebRect& selection); |
| 302 virtual bool WasOpenedByUserGesture() const; | 304 virtual bool WasOpenedByUserGesture() const; |
| 303 virtual void FocusAccessibilityObject(WebCore::AccessibilityObject* acc_obj); | 305 virtual void FocusAccessibilityObject(WebCore::AccessibilityObject* acc_obj); |
| 306 virtual void DidMovePlugin(const WebPluginGeometry& move); |
| 304 virtual void SpellCheck(const std::wstring& word, int* misspell_location, | 307 virtual void SpellCheck(const std::wstring& word, int* misspell_location, |
| 305 int* misspell_length); | 308 int* misspell_length); |
| 306 virtual std::wstring GetAutoCorrectWord(const std::wstring& word); | 309 virtual std::wstring GetAutoCorrectWord(const std::wstring& word); |
| 307 virtual void SetInputMethodState(bool enabled); | 310 virtual void SetInputMethodState(bool enabled); |
| 308 virtual void ScriptedPrint(WebFrame* frame); | 311 virtual void ScriptedPrint(WebFrame* frame); |
| 309 virtual void UserMetricsRecordAction(const std::wstring& action); | 312 virtual void UserMetricsRecordAction(const std::wstring& action); |
| 310 virtual void DnsPrefetch(const std::vector<std::string>& host_names); | 313 virtual void DnsPrefetch(const std::vector<std::string>& host_names); |
| 311 | 314 |
| 312 // DomSerializerDelegate | 315 // DomSerializerDelegate |
| 313 virtual void DidSerializeDataForFrame(const GURL& frame_url, | 316 virtual void DidSerializeDataForFrame(const GURL& frame_url, |
| 314 const std::string& data, PageSavingSerializationStatus status); | 317 const std::string& data, PageSavingSerializationStatus status); |
| 315 | 318 |
| 316 // WebWidgetDelegate | 319 // WebKit::WebWidgetClient |
| 317 // Most methods are handled by RenderWidget. | 320 // Most methods are handled by RenderWidget. |
| 318 virtual void Show(WebWidget* webwidget, WindowOpenDisposition disposition); | 321 virtual void show(WebKit::WebNavigationPolicy policy); |
| 319 virtual void CloseWidgetSoon(WebWidget* webwidget); | 322 virtual void closeWidgetSoon(); |
| 320 virtual void RunModal(WebWidget* webwidget); | 323 virtual void runModal(); |
| 321 | 324 |
| 322 // Do not delete directly. This class is reference counted. | 325 // Do not delete directly. This class is reference counted. |
| 323 virtual ~RenderView(); | 326 virtual ~RenderView(); |
| 324 | 327 |
| 325 // Called when a plugin is destroyed. | 328 // Called when a plugin is destroyed. |
| 326 void PluginDestroyed(WebPluginDelegateProxy* proxy); | 329 void PluginDestroyed(WebPluginDelegateProxy* proxy); |
| 327 | 330 |
| 328 // Called when a plugin has crashed. | 331 // Called when a plugin has crashed. |
| 329 void PluginCrashed(base::ProcessId pid, const FilePath& plugin_path); | 332 void PluginCrashed(base::ProcessId pid, const FilePath& plugin_path); |
| 330 | 333 |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 // PrintWebViewHelper handles printing. Note that this object is constructed | 798 // PrintWebViewHelper handles printing. Note that this object is constructed |
| 796 // when printing for the first time but only destroyed with the RenderView. | 799 // when printing for the first time but only destroyed with the RenderView. |
| 797 scoped_ptr<PrintWebViewHelper> print_helper_; | 800 scoped_ptr<PrintWebViewHelper> print_helper_; |
| 798 | 801 |
| 799 RendererPreferences renderer_preferences_; | 802 RendererPreferences renderer_preferences_; |
| 800 | 803 |
| 801 DISALLOW_COPY_AND_ASSIGN(RenderView); | 804 DISALLOW_COPY_AND_ASSIGN(RenderView); |
| 802 }; | 805 }; |
| 803 | 806 |
| 804 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 807 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |