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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // responsible for creating this RenderView (corresponding to parent_hwnd). | 134 // responsible for creating this RenderView (corresponding to parent_hwnd). |
135 // |counter| is either a currently initialized counter, or NULL (in which case | 135 // |counter| is either a currently initialized counter, or NULL (in which case |
136 // we treat this RenderView as a top level window). | 136 // we treat this RenderView as a top level window). |
137 static RenderView* Create( | 137 static RenderView* Create( |
138 RenderThreadBase* render_thread, | 138 RenderThreadBase* render_thread, |
139 gfx::NativeViewId parent_hwnd, | 139 gfx::NativeViewId parent_hwnd, |
140 int32 opener_id, | 140 int32 opener_id, |
141 const RendererPreferences& renderer_prefs, | 141 const RendererPreferences& renderer_prefs, |
142 const WebPreferences& webkit_prefs, | 142 const WebPreferences& webkit_prefs, |
143 SharedRenderViewCounter* counter, | 143 SharedRenderViewCounter* counter, |
144 int32 routing_id); | 144 int32 routing_id, |
| 145 int64 session_storage_namespace_id); |
145 | 146 |
146 // Sets the "next page id" counter. | 147 // Sets the "next page id" counter. |
147 static void SetNextPageID(int32 next_page_id); | 148 static void SetNextPageID(int32 next_page_id); |
148 | 149 |
149 // May return NULL when the view is closing. | 150 // May return NULL when the view is closing. |
150 WebKit::WebView* webview() const { | 151 WebKit::WebView* webview() const { |
151 return static_cast<WebKit::WebView*>(webwidget()); | 152 return static_cast<WebKit::WebView*>(webwidget()); |
152 } | 153 } |
153 | 154 |
154 gfx::NativeViewId host_window() const { | 155 gfx::NativeViewId host_window() const { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 FRIEND_TEST(RenderViewTest, PrintLayoutTest); | 459 FRIEND_TEST(RenderViewTest, PrintLayoutTest); |
459 FRIEND_TEST(RenderViewTest, OnHandleKeyboardEvent); | 460 FRIEND_TEST(RenderViewTest, OnHandleKeyboardEvent); |
460 FRIEND_TEST(RenderViewTest, InsertCharacters); | 461 FRIEND_TEST(RenderViewTest, InsertCharacters); |
461 #if defined(OS_MACOSX) | 462 #if defined(OS_MACOSX) |
462 FRIEND_TEST(RenderViewTest, MacTestCmdUp); | 463 FRIEND_TEST(RenderViewTest, MacTestCmdUp); |
463 #endif | 464 #endif |
464 | 465 |
465 typedef std::map<std::string, int> HostZoomLevels; | 466 typedef std::map<std::string, int> HostZoomLevels; |
466 | 467 |
467 explicit RenderView(RenderThreadBase* render_thread, | 468 explicit RenderView(RenderThreadBase* render_thread, |
468 const WebPreferences& webkit_preferences); | 469 const WebPreferences& webkit_preferences, |
| 470 int64 session_storage_namespace_id); |
469 | 471 |
470 // Initializes this view with the given parent and ID. The |routing_id| can be | 472 // Initializes this view with the given parent and ID. The |routing_id| can be |
471 // set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case, | 473 // set to 'MSG_ROUTING_NONE' if the true ID is not yet known. In this case, |
472 // CompleteInit must be called later with the true ID. | 474 // CompleteInit must be called later with the true ID. |
473 void Init(gfx::NativeViewId parent, | 475 void Init(gfx::NativeViewId parent, |
474 int32 opener_id, | 476 int32 opener_id, |
475 const RendererPreferences& renderer_prefs, | 477 const RendererPreferences& renderer_prefs, |
476 SharedRenderViewCounter* counter, | 478 SharedRenderViewCounter* counter, |
477 int32 routing_id); | 479 int32 routing_id); |
478 | 480 |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 EditCommands edit_commands_; | 993 EditCommands edit_commands_; |
992 | 994 |
993 // ImageResourceFetchers schedule via DownloadImage. | 995 // ImageResourceFetchers schedule via DownloadImage. |
994 typedef std::set<webkit_glue::ImageResourceFetcher*> ImageResourceFetcherSet; | 996 typedef std::set<webkit_glue::ImageResourceFetcher*> ImageResourceFetcherSet; |
995 ImageResourceFetcherSet image_fetchers_; | 997 ImageResourceFetcherSet image_fetchers_; |
996 | 998 |
997 typedef std::map<WebKit::WebView*, RenderView*> ViewMap; | 999 typedef std::map<WebKit::WebView*, RenderView*> ViewMap; |
998 | 1000 |
999 HostZoomLevels host_zoom_levels_; | 1001 HostZoomLevels host_zoom_levels_; |
1000 | 1002 |
| 1003 // The ID is valid when this class is initialized, but the actual session |
| 1004 // storage namespace is created lazily. |
| 1005 int64 session_storage_namespace_id_; |
| 1006 scoped_ptr<WebKit::WebStorageNamespace> session_storage_namespace_; |
| 1007 |
1001 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1008 DISALLOW_COPY_AND_ASSIGN(RenderView); |
1002 }; | 1009 }; |
1003 | 1010 |
1004 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1011 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |