OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/gfx/point.h" | 12 #include "base/gfx/point.h" |
13 #include "base/gfx/rect.h" | 13 #include "base/gfx/rect.h" |
14 #include "base/id_map.h" | 14 #include "base/id_map.h" |
15 #include "base/shared_memory.h" | 15 #include "base/shared_memory.h" |
16 #include "base/timer.h" | 16 #include "base/timer.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #ifdef CHROME_PERSONALIZATION | 19 #ifdef CHROME_PERSONALIZATION |
20 #include "chrome/personalization/personalization.h" | 20 #include "chrome/personalization/personalization.h" |
21 #endif | 21 #endif |
22 #include "chrome/renderer/automation/dom_automation_controller.h" | 22 #include "chrome/renderer/automation/dom_automation_controller.h" |
23 #include "chrome/renderer/dom_ui_bindings.h" | 23 #include "chrome/renderer/dom_ui_bindings.h" |
24 #include "chrome/renderer/external_host_bindings.h" | 24 #include "chrome/renderer/external_host_bindings.h" |
25 #include "chrome/renderer/external_js_object.h" | 25 #include "chrome/renderer/external_js_object.h" |
26 #include "chrome/renderer/render_widget.h" | 26 #include "chrome/renderer/render_widget.h" |
27 #include "media/audio/audio_output.h" | 27 #include "media/audio/audio_output.h" |
28 #include "testing/gtest/include/gtest/gtest_prod.h" | 28 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 29 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
29 #include "webkit/glue/dom_serializer_delegate.h" | 30 #include "webkit/glue/dom_serializer_delegate.h" |
30 #include "webkit/glue/feed.h" | 31 #include "webkit/glue/feed.h" |
31 #include "webkit/glue/form_data.h" | 32 #include "webkit/glue/form_data.h" |
32 #include "webkit/glue/password_form_dom_manager.h" | 33 #include "webkit/glue/password_form_dom_manager.h" |
33 #include "webkit/glue/webaccessibilitymanager.h" | 34 #include "webkit/glue/webaccessibilitymanager.h" |
34 #include "webkit/glue/webview_delegate.h" | 35 #include "webkit/glue/webview_delegate.h" |
35 #include "webkit/glue/webview.h" | 36 #include "webkit/glue/webview.h" |
36 | 37 |
37 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
38 // RenderView is a diamond-shaped hierarchy, with WebWidgetDelegate at the root. | 39 // RenderView is a diamond-shaped hierarchy, with WebWidgetDelegate at the root. |
(...skipping 29 matching lines...) Expand all Loading... |
68 | 69 |
69 namespace base { | 70 namespace base { |
70 class WaitableEvent; | 71 class WaitableEvent; |
71 } | 72 } |
72 | 73 |
73 namespace webkit_glue { | 74 namespace webkit_glue { |
74 struct FileUploadData; | 75 struct FileUploadData; |
75 } | 76 } |
76 | 77 |
77 namespace WebKit { | 78 namespace WebKit { |
78 struct WebConsoleMessage; | 79 struct WebFindOptions; |
79 struct WebFindInPageRequest; | |
80 } | 80 } |
81 | 81 |
82 // We need to prevent a page from trying to create infinite popups. It is not | 82 // We need to prevent a page from trying to create infinite popups. It is not |
83 // as simple as keeping a count of the number of immediate children | 83 // as simple as keeping a count of the number of immediate children |
84 // popups. Having an html file that window.open()s itself would create | 84 // popups. Having an html file that window.open()s itself would create |
85 // an unlimited chain of RenderViews who only have one RenderView child. | 85 // an unlimited chain of RenderViews who only have one RenderView child. |
86 // | 86 // |
87 // Therefore, each new top level RenderView creates a new counter and shares it | 87 // Therefore, each new top level RenderView creates a new counter and shares it |
88 // with all its children and grandchildren popup RenderViews created with | 88 // with all its children and grandchildren popup RenderViews created with |
89 // CreateWebView() to have a sort of global limit for the page so no more than | 89 // CreateWebView() to have a sort of global limit for the page so no more than |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 void OnPaste(); | 487 void OnPaste(); |
488 void OnReplace(const std::wstring& text); | 488 void OnReplace(const std::wstring& text); |
489 void OnToggleSpellCheck(); | 489 void OnToggleSpellCheck(); |
490 void OnDelete(); | 490 void OnDelete(); |
491 void OnSelectAll(); | 491 void OnSelectAll(); |
492 void OnCopyImageAt(int x, int y); | 492 void OnCopyImageAt(int x, int y); |
493 void OnInspectElement(int x, int y); | 493 void OnInspectElement(int x, int y); |
494 void OnShowJavaScriptConsole(); | 494 void OnShowJavaScriptConsole(); |
495 void OnSetupDevToolsClient(); | 495 void OnSetupDevToolsClient(); |
496 void OnCancelDownload(int32 download_id); | 496 void OnCancelDownload(int32 download_id); |
497 void OnFind(const WebKit::WebFindInPageRequest& request); | 497 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); |
498 void OnZoom(int function); | 498 void OnZoom(int function); |
499 void OnInsertText(const string16& text); | 499 void OnInsertText(const string16& text); |
500 void OnSetPageEncoding(const std::wstring& encoding_name); | 500 void OnSetPageEncoding(const std::wstring& encoding_name); |
501 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); | 501 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); |
502 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( | 502 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( |
503 const std::vector<GURL>& links, | 503 const std::vector<GURL>& links, |
504 const std::vector<FilePath>& local_paths, | 504 const std::vector<FilePath>& local_paths, |
505 const FilePath& local_directory_name); | 505 const FilePath& local_directory_name); |
506 void OnUploadFileRequest(const ViewMsg_UploadFile_Params& p); | 506 void OnUploadFileRequest(const ViewMsg_UploadFile_Params& p); |
507 void OnFormFill(const FormData& form); | 507 void OnFormFill(const FormData& form); |
(...skipping 13 matching lines...) Expand all Loading... |
521 void OnSetAltErrorPageURL(const GURL& gurl); | 521 void OnSetAltErrorPageURL(const GURL& gurl); |
522 | 522 |
523 void OnDownloadImage(int id, const GURL& image_url, int image_size); | 523 void OnDownloadImage(int id, const GURL& image_url, int image_size); |
524 | 524 |
525 void OnGetApplicationInfo(int page_id); | 525 void OnGetApplicationInfo(int page_id); |
526 | 526 |
527 void OnScriptEvalRequest(const std::wstring& frame_xpath, | 527 void OnScriptEvalRequest(const std::wstring& frame_xpath, |
528 const std::wstring& jscript); | 528 const std::wstring& jscript); |
529 void OnCSSInsertRequest(const std::wstring& frame_xpath, | 529 void OnCSSInsertRequest(const std::wstring& frame_xpath, |
530 const std::string& css); | 530 const std::string& css); |
531 void OnAddMessageToConsole(const std::wstring& frame_xpath, | 531 void OnAddMessageToConsole(const string16& frame_xpath, |
532 const WebKit::WebConsoleMessage&); | 532 const string16& message, |
| 533 const WebKit::WebConsoleMessage::Level&); |
533 void OnDebugAttach(); | 534 void OnDebugAttach(); |
534 | 535 |
535 void OnReservePageIDRange(int size_of_range); | 536 void OnReservePageIDRange(int size_of_range); |
536 | 537 |
537 void OnDragSourceEndedOrMoved( | 538 void OnDragSourceEndedOrMoved( |
538 int client_x, int client_y, int screen_x, int screen_y, bool ended); | 539 int client_x, int client_y, int screen_x, int screen_y, bool ended); |
539 void OnDragSourceSystemDragEnded(); | 540 void OnDragSourceSystemDragEnded(); |
540 void OnInstallMissingPlugin(); | 541 void OnInstallMissingPlugin(); |
541 void OnFileChooserResponse(const std::vector<std::wstring>& file_names); | 542 void OnFileChooserResponse(const std::vector<std::wstring>& file_names); |
542 void OnEnableViewSourceMode(); | 543 void OnEnableViewSourceMode(); |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 IDMap<WebFrame> pending_extension_callbacks_; | 830 IDMap<WebFrame> pending_extension_callbacks_; |
830 | 831 |
831 // The currently selected text. This is currently only updated on Linux, where | 832 // The currently selected text. This is currently only updated on Linux, where |
832 // it's for the selection clipboard. | 833 // it's for the selection clipboard. |
833 std::string selection_text_; | 834 std::string selection_text_; |
834 | 835 |
835 DISALLOW_COPY_AND_ASSIGN(RenderView); | 836 DISALLOW_COPY_AND_ASSIGN(RenderView); |
836 }; | 837 }; |
837 | 838 |
838 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 839 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |