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

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

Issue 10450002: Transfer user agent override info between browser and renderer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Diff shows what we do downstream Created 8 years, 7 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 CONTENT_EXPORT static RenderViewImpl* Create( 191 CONTENT_EXPORT static RenderViewImpl* Create(
192 gfx::NativeViewId parent_hwnd, 192 gfx::NativeViewId parent_hwnd,
193 int32 opener_id, 193 int32 opener_id,
194 const content::RendererPreferences& renderer_prefs, 194 const content::RendererPreferences& renderer_prefs,
195 const webkit_glue::WebPreferences& webkit_prefs, 195 const webkit_glue::WebPreferences& webkit_prefs,
196 SharedRenderViewCounter* counter, 196 SharedRenderViewCounter* counter,
197 int32 routing_id, 197 int32 routing_id,
198 int32 surface_id, 198 int32 surface_id,
199 int64 session_storage_namespace_id, 199 int64 session_storage_namespace_id,
200 const string16& frame_name, 200 const string16& frame_name,
201 const std::string& user_agent_override,
201 bool is_renderer_created, 202 bool is_renderer_created,
202 bool swapped_out, 203 bool swapped_out,
203 int32 next_page_id, 204 int32 next_page_id,
204 const WebKit::WebScreenInfo& screen_info, 205 const WebKit::WebScreenInfo& screen_info,
205 content::GuestToEmbedderChannel* guest_to_embedder_channel, 206 content::GuestToEmbedderChannel* guest_to_embedder_channel,
206 AccessibilityMode accessibility_mode); 207 AccessibilityMode accessibility_mode);
207 208
208 // Returns the RenderViewImpl containing the given WebView. 209 // Returns the RenderViewImpl containing the given WebView.
209 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); 210 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview);
210 211
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 WebKit::WebFrame* frame, 624 WebKit::WebFrame* frame,
624 const WebKit::WebIntentServiceInfo& service); 625 const WebKit::WebIntentServiceInfo& service);
625 virtual void dispatchIntent(WebKit::WebFrame* frame, 626 virtual void dispatchIntent(WebKit::WebFrame* frame,
626 const WebKit::WebIntentRequest& intentRequest); 627 const WebKit::WebIntentRequest& intentRequest);
627 virtual void willOpenSocketStream( 628 virtual void willOpenSocketStream(
628 WebKit::WebSocketStreamHandle* handle); 629 WebKit::WebSocketStreamHandle* handle);
629 virtual bool willCheckAndDispatchMessageEvent( 630 virtual bool willCheckAndDispatchMessageEvent(
630 WebKit::WebFrame* source, 631 WebKit::WebFrame* source,
631 WebKit::WebSecurityOrigin targetOrigin, 632 WebKit::WebSecurityOrigin targetOrigin,
632 WebKit::WebDOMMessageEvent event) OVERRIDE; 633 WebKit::WebDOMMessageEvent event) OVERRIDE;
634 virtual bool userAgent(const WebKit::WebURL& url,
Charlie Reis 2012/06/01 00:36:08 That function name doesn't indicate what it's doin
gone 2012/06/01 01:04:06 This appears to be the naming convention for acces
Charlie Reis 2012/06/01 18:04:09 Most of those appear to return a String, which mak
gone 2012/06/14 00:46:39 https://bugs.webkit.org/show_bug.cgi?id=89028
635 WebKit::WebString* userAgent) OVERRIDE;
633 636
634 // WebKit::WebPageSerializerClient implementation ---------------------------- 637 // WebKit::WebPageSerializerClient implementation ----------------------------
635 638
636 virtual void didSerializeDataForFrame( 639 virtual void didSerializeDataForFrame(
637 const WebKit::WebURL& frame_url, 640 const WebKit::WebURL& frame_url,
638 const WebKit::WebCString& data, 641 const WebKit::WebCString& data,
639 PageSerializationStatus status) OVERRIDE; 642 PageSerializationStatus status) OVERRIDE;
640 643
641 // content::RenderView implementation ---------------------------------------- 644 // content::RenderView implementation ----------------------------------------
642 645
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 780
778 RenderViewImpl(gfx::NativeViewId parent_hwnd, 781 RenderViewImpl(gfx::NativeViewId parent_hwnd,
779 int32 opener_id, 782 int32 opener_id,
780 const content::RendererPreferences& renderer_prefs, 783 const content::RendererPreferences& renderer_prefs,
781 const webkit_glue::WebPreferences& webkit_prefs, 784 const webkit_glue::WebPreferences& webkit_prefs,
782 SharedRenderViewCounter* counter, 785 SharedRenderViewCounter* counter,
783 int32 routing_id, 786 int32 routing_id,
784 int32 surface_id, 787 int32 surface_id,
785 int64 session_storage_namespace_id, 788 int64 session_storage_namespace_id,
786 const string16& frame_name, 789 const string16& frame_name,
790 const std::string& user_agent_override,
787 bool is_renderer_created, 791 bool is_renderer_created,
788 bool swapped_out, 792 bool swapped_out,
789 int32 next_page_id, 793 int32 next_page_id,
790 const WebKit::WebScreenInfo& screen_info, 794 const WebKit::WebScreenInfo& screen_info,
791 content::GuestToEmbedderChannel* guest_to_embedder_channel, 795 content::GuestToEmbedderChannel* guest_to_embedder_channel,
792 AccessibilityMode accessibility_mode); 796 AccessibilityMode accessibility_mode);
793 797
794 // Do not delete directly. This class is reference counted. 798 // Do not delete directly. This class is reference counted.
795 virtual ~RenderViewImpl(); 799 virtual ~RenderViewImpl();
796 800
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 const EditCommands& edit_commands); 938 const EditCommands& edit_commands);
935 CONTENT_EXPORT void OnSetHistoryLengthAndPrune(int history_length, 939 CONTENT_EXPORT void OnSetHistoryLengthAndPrune(int history_length,
936 int32 minimum_page_id); 940 int32 minimum_page_id);
937 void OnSetInitialFocus(bool reverse); 941 void OnSetInitialFocus(bool reverse);
938 #if defined(OS_MACOSX) 942 #if defined(OS_MACOSX)
939 void OnSetInLiveResize(bool in_live_resize); 943 void OnSetInLiveResize(bool in_live_resize);
940 #endif 944 #endif
941 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); 945 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect);
942 void OnSetPageEncoding(const std::string& encoding_name); 946 void OnSetPageEncoding(const std::string& encoding_name);
943 void OnSetRendererPrefs(const content::RendererPreferences& renderer_prefs); 947 void OnSetRendererPrefs(const content::RendererPreferences& renderer_prefs);
948 void OnSetUserAgentOverride(const std::string& override);
944 #if defined(OS_MACOSX) 949 #if defined(OS_MACOSX)
945 void OnSetWindowVisibility(bool visible); 950 void OnSetWindowVisibility(bool visible);
946 #endif 951 #endif
947 void OnSetZoomLevel(double zoom_level); 952 void OnSetZoomLevel(double zoom_level);
948 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); 953 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
949 void OnExitFullscreen(); 954 void OnExitFullscreen();
950 void OnShouldClose(); 955 void OnShouldClose();
951 void OnStop(); 956 void OnStop();
952 void OnStopFinding(content::StopFindAction action); 957 void OnStopFinding(content::StopFindAction action);
953 CONTENT_EXPORT void OnSwapOut(const ViewMsg_SwapOut_Params& params); 958 CONTENT_EXPORT void OnSwapOut(const ViewMsg_SwapOut_Params& params);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 // scroll bars on windows smaller than this size. Used for windows that the 1100 // scroll bars on windows smaller than this size. Used for windows that the
1096 // browser resizes to the size of the content, such as browser action popups. 1101 // browser resizes to the size of the content, such as browser action popups.
1097 // If a render view is set to the minimum size of its content, webkit may add 1102 // If a render view is set to the minimum size of its content, webkit may add
1098 // scroll bars. This makes sense for fixed sized windows, but it does not 1103 // scroll bars. This makes sense for fixed sized windows, but it does not
1099 // make sense when the size of the view was chosen to fit the content. 1104 // make sense when the size of the view was chosen to fit the content.
1100 // This setting ensures that no scroll bars are drawn. The size limit exists 1105 // This setting ensures that no scroll bars are drawn. The size limit exists
1101 // because if the view grows beyond a size known to the browser, scroll bars 1106 // because if the view grows beyond a size known to the browser, scroll bars
1102 // should be drawn. 1107 // should be drawn.
1103 gfx::Size disable_scrollbars_size_limit_; 1108 gfx::Size disable_scrollbars_size_limit_;
1104 1109
1110 // String to use when overriding the default user agent.
1111 std::string user_agent_override_;
1112
1113 // Whether or not the override is being used.
1114 bool is_overriding_user_agent_;
1115
1105 // Loading state ------------------------------------------------------------- 1116 // Loading state -------------------------------------------------------------
1106 1117
1107 // True if the top level frame is currently being loaded. 1118 // True if the top level frame is currently being loaded.
1108 bool is_loading_; 1119 bool is_loading_;
1109 1120
1110 // The gesture that initiated the current navigation. 1121 // The gesture that initiated the current navigation.
1111 NavigationGesture navigation_gesture_; 1122 NavigationGesture navigation_gesture_;
1112 1123
1113 // Used for popups. 1124 // Used for popups.
1114 bool opened_by_user_gesture_; 1125 bool opened_by_user_gesture_;
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 // bunch of stuff, you should probably create a helper class and put your 1406 // bunch of stuff, you should probably create a helper class and put your
1396 // data and methods on that to avoid bloating RenderView more. You can 1407 // data and methods on that to avoid bloating RenderView more. You can
1397 // use the Observer interface to filter IPC messages and receive frame change 1408 // use the Observer interface to filter IPC messages and receive frame change
1398 // notifications. 1409 // notifications.
1399 // --------------------------------------------------------------------------- 1410 // ---------------------------------------------------------------------------
1400 1411
1401 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1412 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1402 }; 1413 };
1403 1414
1404 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1415 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698