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

Side by Side Diff: content/public/renderer/content_renderer_client.h

Issue 1824143004: Allow WebView to force MediaPlayer for unsupported containers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't concat strings. Created 4 years, 8 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_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "build/build_config.h"
18 #include "content/public/common/content_client.h" 19 #include "content/public/common/content_client.h"
19 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 20 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
20 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" 21 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
21 #include "third_party/WebKit/public/web/WebNavigationType.h" 22 #include "third_party/WebKit/public/web/WebNavigationType.h"
22 #include "ui/base/page_transition_types.h" 23 #include "ui/base/page_transition_types.h"
23 #include "v8/include/v8.h" 24 #include "v8/include/v8.h"
24 25
25 class GURL; 26 class GURL;
26 class SkBitmap; 27 class SkBitmap;
27 28
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // all widgets are hidden. 193 // all widgets are hidden.
193 virtual bool RunIdleHandlerWhenWidgetsHidden(); 194 virtual bool RunIdleHandlerWhenWidgetsHidden();
194 195
195 // Returns true if the renderer process should allow shared timer suspension 196 // Returns true if the renderer process should allow shared timer suspension
196 // after the process has been backgrounded. Defaults to false. 197 // after the process has been backgrounded. Defaults to false.
197 virtual bool AllowTimerSuspensionWhenProcessBackgrounded(); 198 virtual bool AllowTimerSuspensionWhenProcessBackgrounded();
198 199
199 // Returns true if a popup window should be allowed. 200 // Returns true if a popup window should be allowed.
200 virtual bool AllowPopup(); 201 virtual bool AllowPopup();
201 202
202 #ifdef OS_ANDROID 203 #if defined(OS_ANDROID)
203 // TODO(sgurun) This callback is deprecated and will be removed as soon 204 // TODO(sgurun) This callback is deprecated and will be removed as soon
204 // as android webview completes implementation of a resource throttle based 205 // as android webview completes implementation of a resource throttle based
205 // shouldoverrideurl implementation. See crbug.com/325351 206 // shouldoverrideurl implementation. See crbug.com/325351
206 // 207 //
207 // Returns true if the navigation was handled by the embedder and should be 208 // Returns true if the navigation was handled by the embedder and should be
208 // ignored by WebKit. This method is used by CEF and android_webview. 209 // ignored by WebKit. This method is used by CEF and android_webview.
209 virtual bool HandleNavigation(RenderFrame* render_frame, 210 virtual bool HandleNavigation(RenderFrame* render_frame,
210 bool is_content_initiated, 211 bool is_content_initiated,
211 int opener_id, 212 int opener_id,
212 blink::WebFrame* frame, 213 blink::WebFrame* frame,
213 const blink::WebURLRequest& request, 214 const blink::WebURLRequest& request,
214 blink::WebNavigationType type, 215 blink::WebNavigationType type,
215 blink::WebNavigationPolicy default_policy, 216 blink::WebNavigationPolicy default_policy,
216 bool is_redirect); 217 bool is_redirect);
218
219 // Indicates if the Android MediaPlayer should be used instead of Chrome's
220 // built in media player for the given |url|. Defaults to false.
221 virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
217 #endif 222 #endif
218 223
219 // Returns true if we should fork a new process for the given navigation. 224 // Returns true if we should fork a new process for the given navigation.
220 // If |send_referrer| is set to false (which is the default), no referrer 225 // If |send_referrer| is set to false (which is the default), no referrer
221 // header will be send for the navigation. Otherwise, the referrer header is 226 // header will be send for the navigation. Otherwise, the referrer header is
222 // set according to the frame's referrer policy. 227 // set according to the frame's referrer policy.
223 virtual bool ShouldFork(blink::WebLocalFrame* frame, 228 virtual bool ShouldFork(blink::WebLocalFrame* frame,
224 const GURL& url, 229 const GURL& url,
225 const std::string& http_method, 230 const std::string& http_method,
226 bool is_initial_navigation, 231 bool is_initial_navigation,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 const GURL& url) {} 340 const GURL& url) {}
336 341
337 // Whether this renderer should enforce preferences related to the WebRTC 342 // Whether this renderer should enforce preferences related to the WebRTC
338 // routing logic, i.e. allowing multiple routes and non-proxied UDP. 343 // routing logic, i.e. allowing multiple routes and non-proxied UDP.
339 virtual bool ShouldEnforceWebRTCRoutingPreferences(); 344 virtual bool ShouldEnforceWebRTCRoutingPreferences();
340 }; 345 };
341 346
342 } // namespace content 347 } // namespace content
343 348
344 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 349 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW
« no previous file with comments | « android_webview/test/shell/assets/video.3gp ('k') | content/public/renderer/content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698