Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: content/renderer/render_view_impl.h

Issue 8432011: Move RendererPreferences to content/public/common and also put in the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_RENDERER_RENDER_VIEW_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/basictypes.h" 16 #include "base/basictypes.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/id_map.h" 18 #include "base/id_map.h"
19 #include "base/memory/linked_ptr.h" 19 #include "base/memory/linked_ptr.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
21 #include "base/observer_list.h" 21 #include "base/observer_list.h"
22 #include "base/timer.h" 22 #include "base/timer.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "content/renderer/render_view_selection.h" 24 #include "content/renderer/render_view_selection.h"
25 #include "content/renderer/renderer_webcookiejar_impl.h" 25 #include "content/renderer/renderer_webcookiejar_impl.h"
26 #include "content/common/content_export.h" 26 #include "content/common/content_export.h"
27 #include "content/common/edit_command.h" 27 #include "content/common/edit_command.h"
28 #include "content/common/navigation_gesture.h" 28 #include "content/common/navigation_gesture.h"
29 #include "content/common/renderer_preferences.h"
30 #include "content/public/common/page_zoom.h" 29 #include "content/public/common/page_zoom.h"
30 #include "content/public/common/renderer_preferences.h"
31 #include "content/public/renderer/render_view.h" 31 #include "content/public/renderer/render_view.h"
32 #include "content/renderer/pepper_plugin_delegate_impl.h" 32 #include "content/renderer/pepper_plugin_delegate_impl.h"
33 #include "content/renderer/render_widget.h" 33 #include "content/renderer/render_widget.h"
34 #include "ipc/ipc_platform_file.h" 34 #include "ipc/ipc_platform_file.h"
35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h"
38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClie nt.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClie nt.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 public: 173 public:
174 // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the 174 // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the
175 // parent of the WebView HWND that will be created. If this is a blocked 175 // parent of the WebView HWND that will be created. If this is a blocked
176 // popup or as a new tab, opener_id is the routing ID of the RenderView 176 // popup or as a new tab, opener_id is the routing ID of the RenderView
177 // responsible for creating this RenderView (corresponding to parent_hwnd). 177 // responsible for creating this RenderView (corresponding to parent_hwnd).
178 // |counter| is either a currently initialized counter, or NULL (in which case 178 // |counter| is either a currently initialized counter, or NULL (in which case
179 // we treat this RenderView as a top level window). 179 // we treat this RenderView as a top level window).
180 CONTENT_EXPORT static RenderViewImpl* Create( 180 CONTENT_EXPORT static RenderViewImpl* Create(
181 gfx::NativeViewId parent_hwnd, 181 gfx::NativeViewId parent_hwnd,
182 int32 opener_id, 182 int32 opener_id,
183 const RendererPreferences& renderer_prefs, 183 const content::RendererPreferences& renderer_prefs,
184 const WebPreferences& webkit_prefs, 184 const WebPreferences& webkit_prefs,
185 SharedRenderViewCounter* counter, 185 SharedRenderViewCounter* counter,
186 int32 routing_id, 186 int32 routing_id,
187 int64 session_storage_namespace_id, 187 int64 session_storage_namespace_id,
188 const string16& frame_name); 188 const string16& frame_name);
189 189
190 // Returns the RenderViewImpl containing the given WebView. 190 // Returns the RenderViewImpl containing the given WebView.
191 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); 191 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview);
192 192
193 // Sets the "next page id" counter. 193 // Sets the "next page id" counter.
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 typedef std::map<GURL, double> HostZoomLevels; 681 typedef std::map<GURL, double> HostZoomLevels;
682 682
683 enum ErrorPageType { 683 enum ErrorPageType {
684 DNS_ERROR, 684 DNS_ERROR,
685 HTTP_404, 685 HTTP_404,
686 CONNECTION_ERROR, 686 CONNECTION_ERROR,
687 }; 687 };
688 688
689 RenderViewImpl(gfx::NativeViewId parent_hwnd, 689 RenderViewImpl(gfx::NativeViewId parent_hwnd,
690 int32 opener_id, 690 int32 opener_id,
691 const RendererPreferences& renderer_prefs, 691 const content::RendererPreferences& renderer_prefs,
692 const WebPreferences& webkit_prefs, 692 const WebPreferences& webkit_prefs,
693 SharedRenderViewCounter* counter, 693 SharedRenderViewCounter* counter,
694 int32 routing_id, 694 int32 routing_id,
695 int64 session_storage_namespace_id, 695 int64 session_storage_namespace_id,
696 const string16& frame_name); 696 const string16& frame_name);
697 697
698 // Do not delete directly. This class is reference counted. 698 // Do not delete directly. This class is reference counted.
699 virtual ~RenderViewImpl(); 699 virtual ~RenderViewImpl();
700 700
701 void UpdateURL(WebKit::WebFrame* frame); 701 void UpdateURL(WebKit::WebFrame* frame);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 void OnSetWebUIProperty(const std::string& name, const std::string& value); 830 void OnSetWebUIProperty(const std::string& name, const std::string& value);
831 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); 831 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands);
832 CONTENT_EXPORT void OnSetHistoryLengthAndPrune(int history_length, 832 CONTENT_EXPORT void OnSetHistoryLengthAndPrune(int history_length,
833 int32 minimum_page_id); 833 int32 minimum_page_id);
834 void OnSetInitialFocus(bool reverse); 834 void OnSetInitialFocus(bool reverse);
835 #if defined(OS_MACOSX) 835 #if defined(OS_MACOSX)
836 void OnSetInLiveResize(bool in_live_resize); 836 void OnSetInLiveResize(bool in_live_resize);
837 #endif 837 #endif
838 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); 838 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect);
839 void OnSetPageEncoding(const std::string& encoding_name); 839 void OnSetPageEncoding(const std::string& encoding_name);
840 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); 840 void OnSetRendererPrefs(const content::RendererPreferences& renderer_prefs);
841 #if defined(OS_MACOSX) 841 #if defined(OS_MACOSX)
842 void OnSetWindowVisibility(bool visible); 842 void OnSetWindowVisibility(bool visible);
843 #endif 843 #endif
844 void OnSetZoomLevel(double zoom_level); 844 void OnSetZoomLevel(double zoom_level);
845 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); 845 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
846 void OnExitFullscreen(); 846 void OnExitFullscreen();
847 void OnShouldClose(); 847 void OnShouldClose();
848 void OnStop(); 848 void OnStop();
849 void OnStopFinding(const ViewMsg_StopFinding_Params& params); 849 void OnStopFinding(const ViewMsg_StopFinding_Params& params);
850 void OnSwapOut(const ViewMsg_SwapOut_Params& params); 850 void OnSwapOut(const ViewMsg_SwapOut_Params& params);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 void UpdateTargetURL(const GURL& url, const GURL& fallback_url); 941 void UpdateTargetURL(const GURL& url, const GURL& fallback_url);
942 942
943 // --------------------------------------------------------------------------- 943 // ---------------------------------------------------------------------------
944 // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put 944 // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put
945 // it in the same order in the .cc file as it was in the header. 945 // it in the same order in the .cc file as it was in the header.
946 // --------------------------------------------------------------------------- 946 // ---------------------------------------------------------------------------
947 947
948 // Settings ------------------------------------------------------------------ 948 // Settings ------------------------------------------------------------------
949 949
950 WebPreferences webkit_preferences_; 950 WebPreferences webkit_preferences_;
951 RendererPreferences renderer_preferences_; 951 content::RendererPreferences renderer_preferences_;
952 952
953 HostZoomLevels host_zoom_levels_; 953 HostZoomLevels host_zoom_levels_;
954 954
955 // Whether content state (such as form state, scroll position and page 955 // Whether content state (such as form state, scroll position and page
956 // contents) should be sent to the browser immediately. This is normally 956 // contents) should be sent to the browser immediately. This is normally
957 // false, but set to true by some tests. 957 // false, but set to true by some tests.
958 bool send_content_state_immediately_; 958 bool send_content_state_immediately_;
959 959
960 // Bitwise-ORed set of extra bindings that have been enabled. See 960 // Bitwise-ORed set of extra bindings that have been enabled. See
961 // BindingsPolicy for details. 961 // BindingsPolicy for details.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 // bunch of stuff, you should probably create a helper class and put your 1222 // bunch of stuff, you should probably create a helper class and put your
1223 // data and methods on that to avoid bloating RenderView more. You can 1223 // data and methods on that to avoid bloating RenderView more. You can
1224 // use the Observer interface to filter IPC messages and receive frame change 1224 // use the Observer interface to filter IPC messages and receive frame change
1225 // notifications. 1225 // notifications.
1226 // --------------------------------------------------------------------------- 1226 // ---------------------------------------------------------------------------
1227 1227
1228 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1228 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1229 }; 1229 };
1230 1230
1231 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1231 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698