OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "base/process_util.h" | 15 #include "base/process_util.h" |
16 #include "content/browser/renderer_host/render_widget_host.h" | 16 #include "content/browser/renderer_host/render_widget_host.h" |
17 #include "content/common/window_container_type.h" | 17 #include "content/common/window_container_type.h" |
18 #include "net/base/load_states.h" | 18 #include "net/base/load_states.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
23 #include "webkit/glue/webaccessibility.h" | 23 #include "webkit/glue/webaccessibility.h" |
24 #include "webkit/glue/window_open_disposition.h" | 24 #include "webkit/glue/window_open_disposition.h" |
25 | 25 |
26 class ChildProcessSecurityPolicy; | 26 class ChildProcessSecurityPolicy; |
| 27 struct DesktopNotificationHostMsg_Show_Params; |
27 class FilePath; | 28 class FilePath; |
28 class GURL; | 29 class GURL; |
29 class ListValue; | 30 class ListValue; |
30 class RenderViewHostDelegate; | 31 class RenderViewHostDelegate; |
31 class RenderViewHostObserver; | 32 class RenderViewHostObserver; |
32 class SessionStorageNamespace; | 33 class SessionStorageNamespace; |
33 class SiteInstance; | 34 class SiteInstance; |
34 class SkBitmap; | 35 class SkBitmap; |
35 class ViewMsg_Navigate; | 36 class ViewMsg_Navigate; |
36 struct ContextMenuParams; | 37 struct ContextMenuParams; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 const gfx::Point& client_pt, | 225 const gfx::Point& client_pt, |
225 const gfx::Point& screen_pt, | 226 const gfx::Point& screen_pt, |
226 WebKit::WebDragOperationsMask operations_allowed); | 227 WebKit::WebDragOperationsMask operations_allowed); |
227 void DragTargetDragOver(const gfx::Point& client_pt, | 228 void DragTargetDragOver(const gfx::Point& client_pt, |
228 const gfx::Point& screen_pt, | 229 const gfx::Point& screen_pt, |
229 WebKit::WebDragOperationsMask operations_allowed); | 230 WebKit::WebDragOperationsMask operations_allowed); |
230 void DragTargetDragLeave(); | 231 void DragTargetDragLeave(); |
231 void DragTargetDrop(const gfx::Point& client_pt, | 232 void DragTargetDrop(const gfx::Point& client_pt, |
232 const gfx::Point& screen_pt); | 233 const gfx::Point& screen_pt); |
233 | 234 |
| 235 // Notifies the renderer about the result of a desktop notification. |
| 236 void DesktopNotificationPermissionRequestDone(int callback_context); |
| 237 void DesktopNotificationPostDisplay(int callback_context); |
| 238 void DesktopNotificationPostError(int notification_id, |
| 239 const string16& message); |
| 240 void DesktopNotificationPostClose(int notification_id, bool by_user); |
| 241 void DesktopNotificationPostClick(int notification_id); |
| 242 |
234 // Runs some javascript within the context of a frame in the page. | 243 // Runs some javascript within the context of a frame in the page. |
235 void ExecuteJavascriptInWebFrame(const string16& frame_xpath, | 244 void ExecuteJavascriptInWebFrame(const string16& frame_xpath, |
236 const string16& jscript); | 245 const string16& jscript); |
237 | 246 |
238 // Runs some javascript within the context of a frame in the page. The result | 247 // Runs some javascript within the context of a frame in the page. The result |
239 // is sent back via the notification EXECUTE_JAVASCRIPT_RESULT. | 248 // is sent back via the notification EXECUTE_JAVASCRIPT_RESULT. |
240 int ExecuteJavascriptInWebFrameNotifyResult(const string16& frame_xpath, | 249 int ExecuteJavascriptInWebFrameNotifyResult(const string16& frame_xpath, |
241 const string16& jscript); | 250 const string16& jscript); |
242 | 251 |
243 // Edit operations. | 252 // Edit operations. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 void OnUpdateDragCursor(WebKit::WebDragOperation drag_operation); | 440 void OnUpdateDragCursor(WebKit::WebDragOperation drag_operation); |
432 void OnTakeFocus(bool reverse); | 441 void OnTakeFocus(bool reverse); |
433 void OnAddMessageToConsole(int32 level, | 442 void OnAddMessageToConsole(int32 level, |
434 const std::wstring& message, | 443 const std::wstring& message, |
435 int32 line_no, | 444 int32 line_no, |
436 const std::wstring& source_id); | 445 const std::wstring& source_id); |
437 void OnUpdateInspectorSetting(const std::string& key, | 446 void OnUpdateInspectorSetting(const std::string& key, |
438 const std::string& value); | 447 const std::string& value); |
439 void OnMsgShouldCloseACK(bool proceed); | 448 void OnMsgShouldCloseACK(bool proceed); |
440 void OnMsgClosePageACK(); | 449 void OnMsgClosePageACK(); |
441 | |
442 void OnAccessibilityNotifications( | 450 void OnAccessibilityNotifications( |
443 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params); | 451 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params); |
444 void OnScriptEvalResponse(int id, const ListValue& result); | 452 void OnScriptEvalResponse(int id, const ListValue& result); |
445 void OnDidZoomURL(double zoom_level, bool remember, const GURL& url); | 453 void OnDidZoomURL(double zoom_level, bool remember, const GURL& url); |
| 454 void OnRequestDesktopNotificationPermission(const GURL& origin, |
| 455 int callback_id); |
| 456 void OnShowDesktopNotification( |
| 457 const DesktopNotificationHostMsg_Show_Params& params); |
| 458 void OnCancelDesktopNotification(int notification_id); |
446 | 459 |
447 #if defined(OS_MACOSX) | 460 #if defined(OS_MACOSX) |
448 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 461 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
449 #endif | 462 #endif |
450 | 463 |
451 private: | 464 private: |
452 friend class TestRenderViewHost; | 465 friend class TestRenderViewHost; |
453 | 466 |
454 // The SiteInstance associated with this RenderViewHost. All pages drawn | 467 // The SiteInstance associated with this RenderViewHost. All pages drawn |
455 // in this RenderViewHost are part of this SiteInstance. Should not change | 468 // in this RenderViewHost are part of this SiteInstance. Should not change |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 // The termination status of the last render view that terminated. | 541 // The termination status of the last render view that terminated. |
529 base::TerminationStatus render_view_termination_status_; | 542 base::TerminationStatus render_view_termination_status_; |
530 | 543 |
531 // A list of observers that filter messages. Weak references. | 544 // A list of observers that filter messages. Weak references. |
532 ObserverList<RenderViewHostObserver> observers_; | 545 ObserverList<RenderViewHostObserver> observers_; |
533 | 546 |
534 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 547 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
535 }; | 548 }; |
536 | 549 |
537 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 550 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |