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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebDragOperation.h" |
23 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" | 23 #include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h" |
24 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 24 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
25 #include "webkit/glue/webaccessibility.h" | 25 #include "webkit/glue/webaccessibility.h" |
26 #include "webkit/glue/window_open_disposition.h" | 26 #include "webkit/glue/window_open_disposition.h" |
27 | 27 |
28 class FilePath; | 28 class FilePath; |
29 class GURL; | 29 class GURL; |
30 class ListValue; | 30 class ListValue; |
31 class RenderViewHostDelegate; | 31 class RenderViewHostDelegate; |
| 32 class SessionStorageNamespace; |
32 class SiteInstance; | 33 class SiteInstance; |
33 class SkBitmap; | 34 class SkBitmap; |
34 class ViewMsg_Navigate; | 35 class ViewMsg_Navigate; |
35 struct ContentSettings; | 36 struct ContentSettings; |
36 struct ContextMenuParams; | 37 struct ContextMenuParams; |
37 struct MediaPlayerAction; | 38 struct MediaPlayerAction; |
38 struct ThumbnailScore; | 39 struct ThumbnailScore; |
39 struct ViewHostMsg_DidPrintPage_Params; | 40 struct ViewHostMsg_DidPrintPage_Params; |
40 struct ViewHostMsg_DomMessage_Params; | 41 struct ViewHostMsg_DomMessage_Params; |
41 struct ViewHostMsg_RunFileChooser_Params; | 42 struct ViewHostMsg_RunFileChooser_Params; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // if we want to bring that and other functionality down into this object so | 92 // if we want to bring that and other functionality down into this object so |
92 // it can be shared by others. | 93 // it can be shared by others. |
93 // | 94 // |
94 class RenderViewHost : public RenderWidgetHost { | 95 class RenderViewHost : public RenderWidgetHost { |
95 public: | 96 public: |
96 // Returns the RenderViewHost given its ID and the ID of its render process. | 97 // Returns the RenderViewHost given its ID and the ID of its render process. |
97 // Returns NULL if the IDs do not correspond to a live RenderViewHost. | 98 // Returns NULL if the IDs do not correspond to a live RenderViewHost. |
98 static RenderViewHost* FromID(int render_process_id, int render_view_id); | 99 static RenderViewHost* FromID(int render_process_id, int render_view_id); |
99 | 100 |
100 // routing_id could be a valid route id, or it could be MSG_ROUTING_NONE, in | 101 // routing_id could be a valid route id, or it could be MSG_ROUTING_NONE, in |
101 // which case RenderWidgetHost will create a new one. | 102 // which case RenderWidgetHost will create a new one. The session storage |
| 103 // namespace parameter allows multiple render views to share the same session |
| 104 // storage (part of the WebStorage spec) space. Passing in NULL simply |
| 105 // allocates a new one (which is useful for testing). |
102 RenderViewHost(SiteInstance* instance, | 106 RenderViewHost(SiteInstance* instance, |
103 RenderViewHostDelegate* delegate, | 107 RenderViewHostDelegate* delegate, |
104 int routing_id, | 108 int routing_id, |
105 int64 session_storage_namespace_id); | 109 SessionStorageNamespace* session_storage_namespace); |
106 virtual ~RenderViewHost(); | 110 virtual ~RenderViewHost(); |
107 | 111 |
108 SiteInstance* site_instance() const { return instance_; } | 112 SiteInstance* site_instance() const { return instance_; } |
109 RenderViewHostDelegate* delegate() const { return delegate_; } | 113 RenderViewHostDelegate* delegate() const { return delegate_; } |
110 | 114 |
111 // Set up the RenderView child process. Virtual because it is overridden by | 115 // Set up the RenderView child process. Virtual because it is overridden by |
112 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used | 116 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used |
113 // as the name of the new top-level frame. | 117 // as the name of the new top-level frame. |
114 virtual bool CreateRenderView(const string16& frame_name); | 118 virtual bool CreateRenderView(const string16& frame_name); |
115 | 119 |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 // is_waiting_for_unload_ack_ is true. This tells us if the unload request | 740 // is_waiting_for_unload_ack_ is true. This tells us if the unload request |
737 // is for closing the entire tab ( = false), or only this RenderViewHost in | 741 // is for closing the entire tab ( = false), or only this RenderViewHost in |
738 // the case of a cross-site transition ( = true). | 742 // the case of a cross-site transition ( = true). |
739 bool unload_ack_is_for_cross_site_transition_; | 743 bool unload_ack_is_for_cross_site_transition_; |
740 | 744 |
741 bool are_javascript_messages_suppressed_; | 745 bool are_javascript_messages_suppressed_; |
742 | 746 |
743 // True if the render view can be shut down suddenly. | 747 // True if the render view can be shut down suddenly. |
744 bool sudden_termination_allowed_; | 748 bool sudden_termination_allowed_; |
745 | 749 |
746 // The session storage namespace id to be used by the associated render view. | 750 // The session storage namespace to be used by the associated render view. |
747 int64 session_storage_namespace_id_; | 751 scoped_refptr<SessionStorageNamespace> session_storage_namespace_; |
748 | 752 |
749 // Whether this render view will get extension api bindings. This controls | 753 // Whether this render view will get extension api bindings. This controls |
750 // what process type we use. | 754 // what process type we use. |
751 bool is_extension_process_; | 755 bool is_extension_process_; |
752 | 756 |
753 // AutoFill and Autocomplete suggestions. We accumulate these separately and | 757 // AutoFill and Autocomplete suggestions. We accumulate these separately and |
754 // send them back to the renderer together. | 758 // send them back to the renderer together. |
755 int autofill_query_id_; | 759 int autofill_query_id_; |
756 std::vector<string16> autofill_values_; | 760 std::vector<string16> autofill_values_; |
757 std::vector<string16> autofill_labels_; | 761 std::vector<string16> autofill_labels_; |
758 std::vector<string16> autofill_icons_; | 762 std::vector<string16> autofill_icons_; |
759 std::vector<int> autofill_unique_ids_; | 763 std::vector<int> autofill_unique_ids_; |
760 | 764 |
761 // Whether the accessibility tree should be saved, for unit testing. | 765 // Whether the accessibility tree should be saved, for unit testing. |
762 bool save_accessibility_tree_for_testing_; | 766 bool save_accessibility_tree_for_testing_; |
763 | 767 |
764 // The most recently received accessibility tree - for unit testing only. | 768 // The most recently received accessibility tree - for unit testing only. |
765 webkit_glue::WebAccessibility accessibility_tree_; | 769 webkit_glue::WebAccessibility accessibility_tree_; |
766 | 770 |
767 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 771 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
768 }; | 772 }; |
769 | 773 |
770 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 774 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |