OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
12 #include "chrome/browser/renderer_host/render_widget_host.h" | 12 #include "chrome/browser/renderer_host/render_widget_host.h" |
13 #include "chrome/common/page_zoom.h" | 13 #include "chrome/common/page_zoom.h" |
14 #include "chrome/common/view_types.h" | 14 #include "chrome/common/view_types.h" |
15 #include "net/base/load_states.h" | 15 #include "net/base/load_states.h" |
16 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
17 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" | 17 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" |
18 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 18 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
19 #include "webkit/glue/form_field_values.h" | 19 #include "webkit/glue/form_field_values.h" |
20 #include "webkit/glue/password_form_dom_manager.h" | 20 #include "webkit/glue/password_form_dom_manager.h" |
21 #include "webkit/glue/window_open_disposition.h" | 21 #include "webkit/glue/window_open_disposition.h" |
22 | 22 |
23 class FilePath; | 23 class FilePath; |
24 class ListValue; | 24 class ListValue; |
25 class RenderViewHostDelegate; | 25 class RenderViewHostDelegate; |
26 class SiteInstance; | 26 class SiteInstance; |
27 class SkBitmap; | 27 class SkBitmap; |
28 class ViewMsg_Navigate; | 28 class ViewMsg_Navigate; |
| 29 struct ContentSettings; |
29 struct ContextMenuParams; | 30 struct ContextMenuParams; |
30 struct MediaPlayerAction; | 31 struct MediaPlayerAction; |
31 struct ThumbnailScore; | 32 struct ThumbnailScore; |
32 struct ViewHostMsg_DidPrintPage_Params; | 33 struct ViewHostMsg_DidPrintPage_Params; |
33 struct ViewMsg_Navigate_Params; | 34 struct ViewMsg_Navigate_Params; |
34 struct WebDropData; | 35 struct WebDropData; |
35 struct WebPreferences; | 36 struct WebPreferences; |
36 | 37 |
37 namespace gfx { | 38 namespace gfx { |
38 class Point; | 39 class Point; |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 // Tells the renderer to translate the current page from one language to | 441 // Tells the renderer to translate the current page from one language to |
441 // another. If the current page id is not |page_id|, the request is ignored. | 442 // another. If the current page id is not |page_id|, the request is ignored. |
442 void TranslatePage(int page_id, | 443 void TranslatePage(int page_id, |
443 const std::string& source_lang, | 444 const std::string& source_lang, |
444 const std::string& target_lang); | 445 const std::string& target_lang); |
445 | 446 |
446 // Instructs the renderer to revert the page's text to its original | 447 // Instructs the renderer to revert the page's text to its original |
447 // non translated content. | 448 // non translated content. |
448 void UndoTranslatePage(int page_id); | 449 void UndoTranslatePage(int page_id); |
449 | 450 |
| 451 // Informs renderer of updated content settings. |
| 452 void SendContentSettings(const std::string& host, |
| 453 const ContentSettings& settings); |
| 454 |
450 protected: | 455 protected: |
451 // RenderWidgetHost protected overrides. | 456 // RenderWidgetHost protected overrides. |
452 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 457 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
453 bool* is_keyboard_shortcut); | 458 bool* is_keyboard_shortcut); |
454 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); | 459 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); |
455 virtual void OnUserGesture(); | 460 virtual void OnUserGesture(); |
456 virtual void NotifyRendererUnresponsive(); | 461 virtual void NotifyRendererUnresponsive(); |
457 virtual void NotifyRendererResponsive(); | 462 virtual void NotifyRendererResponsive(); |
458 virtual void OnMsgFocusedNodeChanged(); | 463 virtual void OnMsgFocusedNodeChanged(); |
459 | 464 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 // True if the render view can be shut down suddenly. | 677 // True if the render view can be shut down suddenly. |
673 bool sudden_termination_allowed_; | 678 bool sudden_termination_allowed_; |
674 | 679 |
675 // The session storage namespace id to be used by the associated render view. | 680 // The session storage namespace id to be used by the associated render view. |
676 int64 session_storage_namespace_id_; | 681 int64 session_storage_namespace_id_; |
677 | 682 |
678 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 683 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
679 }; | 684 }; |
680 | 685 |
681 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 686 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |