content_browser_client.h revision f2477e01787aa58f445919b809d89e252beef54f
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
3// found in the LICENSE file.
4
5#ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6#define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7
8#include <map>
9#include <string>
10#include <utility>
11#include <vector>
12
13#include "base/callback_forward.h"
14#include "base/memory/linked_ptr.h"
15#include "base/memory/scoped_ptr.h"
16#include "base/memory/scoped_vector.h"
17#include "base/values.h"
18#include "content/public/browser/certificate_request_result_type.h"
19#include "content/public/browser/file_descriptor_info.h"
20#include "content/public/common/content_client.h"
21#include "content/public/common/socket_permission_request.h"
22#include "content/public/common/window_container_type.h"
23#include "net/base/mime_util.h"
24#include "net/cookies/canonical_cookie.h"
25#include "net/url_request/url_request_job_factory.h"
26#include "third_party/WebKit/public/web/WebNotificationPresenter.h"
27#include "ui/base/window_open_disposition.h"
28#include "webkit/common/resource_type.h"
29
30#if defined(OS_POSIX) && !defined(OS_MACOSX)
31#include "base/posix/global_descriptors.h"
32#endif
33
34class CommandLine;
35class GURL;
36struct WebPreferences;
37
38namespace blink {
39struct WebWindowFeatures;
40}
41
42namespace base {
43class DictionaryValue;
44class FilePath;
45}
46namespace crypto {
47class CryptoModuleBlockingPasswordDelegate;
48}
49
50namespace gfx {
51class ImageSkia;
52}
53
54namespace net {
55class CookieOptions;
56class HttpNetworkSession;
57class NetLog;
58class SSLCertRequestInfo;
59class SSLInfo;
60class URLRequest;
61class URLRequestContext;
62class URLRequestContextGetter;
63class X509Certificate;
64}
65
66namespace sandbox {
67class TargetPolicy;
68}
69
70namespace ui {
71class SelectFilePolicy;
72}
73
74namespace fileapi {
75class ExternalMountPoints;
76class FileSystemBackend;
77}
78
79namespace content {
80
81class AccessTokenStore;
82class BrowserChildProcessHost;
83class BrowserContext;
84class BrowserMainParts;
85class BrowserPluginGuestDelegate;
86class BrowserPpapiHost;
87class BrowserURLHandler;
88class LocationProvider;
89class MediaObserver;
90class QuotaPermissionContext;
91class RenderProcessHost;
92class RenderViewHost;
93class RenderViewHostDelegateView;
94class ResourceContext;
95class SiteInstance;
96class SpeechRecognitionManagerDelegate;
97class VibrationProvider;
98class WebContents;
99class WebContentsViewDelegate;
100class WebContentsViewPort;
101struct MainFunctionParams;
102struct Referrer;
103struct ShowDesktopNotificationHostMsgParams;
104
105// A mapping from the scheme name to the protocol handler that services its
106// content.
107typedef std::map<
108  std::string, linked_ptr<net::URLRequestJobFactory::ProtocolHandler> >
109    ProtocolHandlerMap;
110
111// Embedder API (or SPI) for participating in browser logic, to be implemented
112// by the client of the content browser. See ChromeContentBrowserClient for the
113// principal implementation. The methods are assumed to be called on the UI
114// thread unless otherwise specified. Use this "escape hatch" sparingly, to
115// avoid the embedder interface ballooning and becoming very specific to Chrome.
116// (Often, the call out to the client can happen in a different part of the code
117// that either already has a hook out to the embedder, or calls out to one of
118// the observer interfaces.)
119class CONTENT_EXPORT ContentBrowserClient {
120 public:
121  virtual ~ContentBrowserClient() {}
122
123  // Allows the embedder to set any number of custom BrowserMainParts
124  // implementations for the browser startup code. See comments in
125  // browser_main_parts.h.
126  virtual BrowserMainParts* CreateBrowserMainParts(
127      const MainFunctionParams& parameters);
128
129  // Allows an embedder to return their own WebContentsViewPort implementation.
130  // Return NULL to let the default one for the platform be created. Otherwise
131  // |render_view_host_delegate_view| also needs to be provided, and it is
132  // owned by the embedder.
133  virtual WebContentsViewPort* OverrideCreateWebContentsView(
134      WebContents* web_contents,
135      RenderViewHostDelegateView** render_view_host_delegate_view);
136
137  // If content creates the WebContentsView implementation, it will ask the
138  // embedder to return an (optional) delegate to customize it. The view will
139  // own the delegate.
140  virtual WebContentsViewDelegate* GetWebContentsViewDelegate(
141      WebContents* web_contents);
142
143  // Notifies that a guest WebContents has been created. A guest WebContents
144  // represents a renderer that's hosted within a BrowserPlugin. Creation can
145  // occur an arbitrary length of time before attachment. If the new guest has
146  // an |opener_web_contents|, then it's a new window created by that opener.
147  // If the guest was created via navigation, then |extra_params| will be
148  // non-NULL. |extra_params| are parameters passed to the BrowserPlugin object
149  // element by the content embedder. These parameters may include the API to
150  // enable for the given guest. |guest_delegate| is a return parameter of
151  // the delegate in the content embedder that will service the guest in the
152  // content layer. The content layer takes ownership of the |guest_delegate|.
153  virtual void GuestWebContentsCreated(
154      SiteInstance* guest_site_instance,
155      WebContents* guest_web_contents,
156      WebContents* opener_web_contents,
157      BrowserPluginGuestDelegate** guest_delegate,
158      scoped_ptr<base::DictionaryValue> extra_params) {}
159
160  // Notifies that a guest WebContents has been attached to a BrowserPlugin.
161  // A guest is attached to a BrowserPlugin when the guest has acquired an
162  // embedder WebContents. This happens on initial navigation or when a new
163  // window is attached to a BrowserPlugin. |extra_params| are params sent
164  // from javascript.
165  virtual void GuestWebContentsAttached(
166      WebContents* guest_web_contents,
167      WebContents* embedder_web_contents,
168      const base::DictionaryValue& extra_params) {}
169
170  // Notifies that a RenderProcessHost has been created. This is called before
171  // the content layer adds its own BrowserMessageFilters, so that the
172  // embedder's IPC filters have priority.
173  virtual void RenderProcessHostCreated(RenderProcessHost* host) {}
174
175  // Notifies that a BrowserChildProcessHost has been created.
176  virtual void BrowserChildProcessHostCreated(BrowserChildProcessHost* host) {}
177
178  // Get the effective URL for the given actual URL, to allow an embedder to
179  // group different url schemes in the same SiteInstance.
180  virtual GURL GetEffectiveURL(BrowserContext* browser_context,
181                               const GURL& url);
182
183  // Returns whether all instances of the specified effective URL should be
184  // rendered by the same process, rather than using process-per-site-instance.
185  virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context,
186                                       const GURL& effective_url);
187
188  // Returns a list additional WebUI schemes, if any.  These additional schemes
189  // act as aliases to the chrome: scheme.  The additional schemes may or may
190  // not serve specific WebUI pages depending on the particular URLDataSource
191  // and its override of URLDataSource::ShouldServiceRequest.
192  virtual void GetAdditionalWebUISchemes(
193      std::vector<std::string>* additional_schemes) {}
194
195  // Creates the main net::URLRequestContextGetter. Should only be called once
196  // per ContentBrowserClient object.
197  // TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
198  virtual net::URLRequestContextGetter* CreateRequestContext(
199      BrowserContext* browser_context,
200      ProtocolHandlerMap* protocol_handlers);
201
202  // Creates the net::URLRequestContextGetter for a StoragePartition. Should
203  // only be called once per partition_path per ContentBrowserClient object.
204  // TODO(ajwong): Remove once http://crbug.com/159193 is resolved.
205  virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
206      BrowserContext* browser_context,
207      const base::FilePath& partition_path,
208      bool in_memory,
209      ProtocolHandlerMap* protocol_handlers);
210
211  // Returns whether a specified URL is handled by the embedder's internal
212  // protocol handlers.
213  virtual bool IsHandledURL(const GURL& url);
214
215  // Returns whether the given process is allowed to commit |url|.  This is a
216  // more conservative check than IsSuitableHost, since it is used after a
217  // navigation has committed to ensure that the process did not exceed its
218  // authority.
219  virtual bool CanCommitURL(RenderProcessHost* process_host, const GURL& url);
220
221  // Returns whether a URL should be allowed to open from a specific context.
222  // This also applies in cases where the new URL will open in another process.
223  virtual bool ShouldAllowOpenURL(SiteInstance* site_instance, const GURL& url);
224
225  // Returns whether a new view for a given |site_url| can be launched in a
226  // given |process_host|.
227  virtual bool IsSuitableHost(RenderProcessHost* process_host,
228                              const GURL& site_url);
229
230  // Returns whether a new process should be created or an existing one should
231  // be reused based on the URL we want to load. This should return false,
232  // unless there is a good reason otherwise.
233  virtual bool ShouldTryToUseExistingProcessHost(
234      BrowserContext* browser_context, const GURL& url);
235
236  // Called when a site instance is first associated with a process.
237  virtual void SiteInstanceGotProcess(SiteInstance* site_instance) {}
238
239  // Called from a site instance's destructor.
240  virtual void SiteInstanceDeleting(SiteInstance* site_instance) {}
241
242  // Returns true if for the navigation from |current_url| to |new_url|
243  // in |site_instance|, a new SiteInstance and BrowsingInstance should be
244  // created (even if we are in a process model that doesn't usually swap.)
245  // This forces a process swap and severs script connections with existing
246  // tabs.
247  virtual bool ShouldSwapBrowsingInstancesForNavigation(
248      SiteInstance* site_instance,
249      const GURL& current_url,
250      const GURL& new_url);
251
252  // Returns true if the given navigation redirect should cause a renderer
253  // process swap.
254  // This is called on the IO thread.
255  virtual bool ShouldSwapProcessesForRedirect(ResourceContext* resource_context,
256                                              const GURL& current_url,
257                                              const GURL& new_url);
258
259  // Returns true if the passed in URL should be assigned as the site of the
260  // current SiteInstance, if it does not yet have a site.
261  virtual bool ShouldAssignSiteForURL(const GURL& url);
262
263  // See CharacterEncoding's comment.
264  virtual std::string GetCanonicalEncodingNameByAliasName(
265      const std::string& alias_name);
266
267  // Allows the embedder to pass extra command line flags.
268  // switches::kProcessType will already be set at this point.
269  virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
270                                              int child_process_id) {}
271
272  // Returns the locale used by the application.
273  // This is called on the UI and IO threads.
274  virtual std::string GetApplicationLocale();
275
276  // Returns the languages used in the Accept-Languages HTTP header.
277  // (Not called GetAcceptLanguages so it doesn't clash with win32).
278  virtual std::string GetAcceptLangs(BrowserContext* context);
279
280  // Returns the default favicon.  The callee doesn't own the given bitmap.
281  virtual gfx::ImageSkia* GetDefaultFavicon();
282
283  // Allow the embedder to control if an AppCache can be used for the given url.
284  // This is called on the IO thread.
285  virtual bool AllowAppCache(const GURL& manifest_url,
286                             const GURL& first_party,
287                             ResourceContext* context);
288
289  // Allow the embedder to control if the given cookie can be read.
290  // This is called on the IO thread.
291  virtual bool AllowGetCookie(const GURL& url,
292                              const GURL& first_party,
293                              const net::CookieList& cookie_list,
294                              ResourceContext* context,
295                              int render_process_id,
296                              int render_view_id);
297
298  // Allow the embedder to control if the given cookie can be set.
299  // This is called on the IO thread.
300  virtual bool AllowSetCookie(const GURL& url,
301                              const GURL& first_party,
302                              const std::string& cookie_line,
303                              ResourceContext* context,
304                              int render_process_id,
305                              int render_view_id,
306                              net::CookieOptions* options);
307
308  // This is called on the IO thread.
309  virtual bool AllowSaveLocalState(ResourceContext* context);
310
311  // Allow the embedder to control if access to web database by a shared worker
312  // is allowed. |render_views| is a vector of pairs of
313  // RenderProcessID/RenderViewID of RenderViews that are using this worker.
314  // This is called on the IO thread.
315  virtual bool AllowWorkerDatabase(
316      const GURL& url,
317      const string16& name,
318      const string16& display_name,
319      unsigned long estimated_size,
320      ResourceContext* context,
321      const std::vector<std::pair<int, int> >& render_views);
322
323  // Allow the embedder to control if access to file system by a shared worker
324  // is allowed.
325  // This is called on the IO thread.
326  virtual bool AllowWorkerFileSystem(
327      const GURL& url,
328      ResourceContext* context,
329      const std::vector<std::pair<int, int> >& render_views);
330
331  // Allow the embedder to control if access to IndexedDB by a shared worker
332  // is allowed.
333  // This is called on the IO thread.
334  virtual bool AllowWorkerIndexedDB(
335      const GURL& url,
336      const string16& name,
337      ResourceContext* context,
338      const std::vector<std::pair<int, int> >& render_views);
339
340  // Allow the embedder to override the request context based on the URL for
341  // certain operations, like cookie access. Returns NULL to indicate the
342  // regular request context should be used.
343  // This is called on the IO thread.
344  virtual net::URLRequestContext* OverrideRequestContextForURL(
345      const GURL& url, ResourceContext* context);
346
347  // Allow the embedder to specify a string version of the storage partition
348  // config with a site.
349  virtual std::string GetStoragePartitionIdForSite(
350      content::BrowserContext* browser_context,
351      const GURL& site);
352
353  // Allows the embedder to provide a validation check for |partition_id|s.
354  // This domain of valid entries should match the range of outputs for
355  // GetStoragePartitionIdForChildProcess().
356  virtual bool IsValidStoragePartitionId(BrowserContext* browser_context,
357                                         const std::string& partition_id);
358
359  // Allows the embedder to provide a storage parititon configuration for a
360  // site. A storage partition configuration includes a domain of the embedder's
361  // choice, an optional name within that domain, and whether the partition is
362  // in-memory only.
363  //
364  // If |can_be_default| is false, the caller is telling the embedder that the
365  // |site| is known to not be in the default partition. This is useful in
366  // some shutdown situations where the bookkeeping logic that maps sites to
367  // their partition configuration are no longer valid.
368  //
369  // The |partition_domain| is [a-z]* UTF-8 string, specifying the domain in
370  // which partitions live (similar to namespace). Within a domain, partitions
371  // can be uniquely identified by the combination of |partition_name| and
372  // |in_memory| values. When a partition is not to be persisted, the
373  // |in_memory| value must be set to true.
374  virtual void GetStoragePartitionConfigForSite(
375      content::BrowserContext* browser_context,
376      const GURL& site,
377      bool can_be_default,
378      std::string* partition_domain,
379      std::string* partition_name,
380      bool* in_memory);
381
382  // Create and return a new quota permission context.
383  virtual QuotaPermissionContext* CreateQuotaPermissionContext();
384
385  // Informs the embedder that a certificate error has occured.  If
386  // |overridable| is true and if |strict_enforcement| is false, the user
387  // can ignore the error and continue. The embedder can call the callback
388  // asynchronously. If |result| is not set to
389  // CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE, the request will be cancelled
390  // or denied immediately, and the callback won't be run.
391  virtual void AllowCertificateError(
392      int render_process_id,
393      int render_view_id,
394      int cert_error,
395      const net::SSLInfo& ssl_info,
396      const GURL& request_url,
397      ResourceType::Type resource_type,
398      bool overridable,
399      bool strict_enforcement,
400      const base::Callback<void(bool)>& callback,
401      CertificateRequestResultType* result) {}
402
403  // Selects a SSL client certificate and returns it to the |callback|. If no
404  // certificate was selected NULL is returned to the |callback|.
405  virtual void SelectClientCertificate(
406      int render_process_id,
407      int render_view_id,
408      const net::HttpNetworkSession* network_session,
409      net::SSLCertRequestInfo* cert_request_info,
410      const base::Callback<void(net::X509Certificate*)>& callback) {}
411
412  // Adds a new installable certificate or private key.
413  // Typically used to install an X.509 user certificate.
414  // Note that it's up to the embedder to verify that the data is
415  // well-formed. |cert_data| will be NULL if file_size is 0.
416  virtual void AddCertificate(
417      net::URLRequest* request,
418      net::CertificateMimeType cert_type,
419      const void* cert_data,
420      size_t cert_size,
421      int render_process_id,
422      int render_view_id) {}
423
424  // Returns a class to get notifications about media event. The embedder can
425  // return NULL if they're not interested.
426  virtual MediaObserver* GetMediaObserver();
427
428  // Asks permission to show desktop notifications.
429  virtual void RequestDesktopNotificationPermission(
430      const GURL& source_origin,
431      int callback_context,
432      int render_process_id,
433      int render_view_id) {}
434
435  // Checks if the given page has permission to show desktop notifications.
436  // This is called on the IO thread.
437  virtual blink::WebNotificationPresenter::Permission
438      CheckDesktopNotificationPermission(
439          const GURL& source_url,
440          ResourceContext* context,
441          int render_process_id);
442
443  // Show a desktop notification.  If |worker| is true, the request came from an
444  // HTML5 web worker, otherwise, it came from a renderer.
445  virtual void ShowDesktopNotification(
446      const ShowDesktopNotificationHostMsgParams& params,
447      int render_process_id,
448      int render_view_id,
449      bool worker) {}
450
451  // Cancels a displayed desktop notification.
452  virtual void CancelDesktopNotification(
453      int render_process_id,
454      int render_view_id,
455      int notification_id) {}
456
457  // Returns true if the given page is allowed to open a window of the given
458  // type. If true is returned, |no_javascript_access| will indicate whether
459  // the window that is created should be scriptable/in the same process.
460  // This is called on the IO thread.
461  virtual bool CanCreateWindow(const GURL& opener_url,
462                               const GURL& opener_top_level_frame_url,
463                               const GURL& source_origin,
464                               WindowContainerType container_type,
465                               const GURL& target_url,
466                               const content::Referrer& referrer,
467                               WindowOpenDisposition disposition,
468                               const blink::WebWindowFeatures& features,
469                               bool user_gesture,
470                               bool opener_suppressed,
471                               content::ResourceContext* context,
472                               int render_process_id,
473                               bool is_guest,
474                               int opener_id,
475                               bool* no_javascript_access);
476
477  // Returns a title string to use in the task manager for a process host with
478  // the given URL, or the empty string to fall back to the default logic.
479  // This is called on the IO thread.
480  virtual std::string GetWorkerProcessTitle(const GURL& url,
481                                            ResourceContext* context);
482
483  // Notifies the embedder that the ResourceDispatcherHost has been created.
484  // This is when it can optionally add a delegate.
485  virtual void ResourceDispatcherHostCreated() {}
486
487  // Allows the embedder to return a delegate for the SpeechRecognitionManager.
488  // The delegate will be owned by the manager. It's valid to return NULL.
489  virtual SpeechRecognitionManagerDelegate*
490      GetSpeechRecognitionManagerDelegate();
491
492  // Getters for common objects.
493  virtual net::NetLog* GetNetLog();
494
495  // Creates a new AccessTokenStore for gelocation.
496  virtual AccessTokenStore* CreateAccessTokenStore();
497
498  // Returns true if fast shutdown is possible.
499  virtual bool IsFastShutdownPossible();
500
501  // Called by WebContents to override the WebKit preferences that are used by
502  // the renderer. The content layer will add its own settings, and then it's up
503  // to the embedder to update it if it wants.
504  virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host,
505                                   const GURL& url,
506                                   WebPreferences* prefs) {}
507
508  // Inspector setting was changed and should be persisted.
509  virtual void UpdateInspectorSetting(RenderViewHost* rvh,
510                                      const std::string& key,
511                                      const std::string& value) {}
512
513  // Notifies that BrowserURLHandler has been created, so that the embedder can
514  // optionally add their own handlers.
515  virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) {}
516
517  // Clears browser cache.
518  virtual void ClearCache(RenderViewHost* rvh) {}
519
520  // Clears browser cookies.
521  virtual void ClearCookies(RenderViewHost* rvh) {}
522
523  // Returns the default download directory.
524  // This can be called on any thread.
525  virtual base::FilePath GetDefaultDownloadDirectory();
526
527  // Returns the default filename used in downloads when we have no idea what
528  // else we should do with the file.
529  virtual std::string GetDefaultDownloadName();
530
531  // Notification that a pepper plugin has just been spawned. This allows the
532  // embedder to add filters onto the host to implement interfaces.
533  // This is called on the IO thread.
534  virtual void DidCreatePpapiPlugin(BrowserPpapiHost* browser_host) {}
535
536  // Gets the host for an external out-of-process plugin.
537  virtual content::BrowserPpapiHost* GetExternalBrowserPpapiHost(
538      int plugin_child_id);
539
540  // Returns true if the given browser_context and site_url support hosting
541  // BrowserPlugins.
542  virtual bool SupportsBrowserPlugin(BrowserContext* browser_context,
543                                     const GURL& site_url);
544
545  // Returns true if the socket operation specified by |params| is allowed from
546  // the given |browser_context| and |url|. If |params| is NULL, this method
547  // checks the basic "socket" permission, which is for those operations that
548  // don't require a specific socket permission rule.
549  // |private_api| indicates whether this permission check is for the private
550  // Pepper socket API or the public one.
551  virtual bool AllowPepperSocketAPI(BrowserContext* browser_context,
552                                    const GURL& url,
553                                    bool private_api,
554                                    const SocketPermissionRequest* params);
555
556  // Returns an implementation of a file selecition policy. Can return NULL.
557  virtual ui::SelectFilePolicy* CreateSelectFilePolicy(
558      WebContents* web_contents);
559
560  // Returns additional allowed scheme set which can access files in
561  // FileSystem API.
562  virtual void GetAdditionalAllowedSchemesForFileSystem(
563      std::vector<std::string>* additional_schemes) {}
564
565  // Returns additional file system backends for FileSystem API.
566  // |browser_context| is needed in the additional FileSystemBackends.
567  // It has mount points to create objects returned by additional
568  // FileSystemBackends, and SpecialStoragePolicy for permission granting.
569  virtual void GetAdditionalFileSystemBackends(
570      BrowserContext* browser_context,
571      const base::FilePath& storage_partition_path,
572      ScopedVector<fileapi::FileSystemBackend>* additional_backends) {}
573
574  // Allows an embedder to return its own LocationProvider implementation.
575  // Return NULL to use the default one for the platform to be created.
576  // FYI: Used by an external project; please don't remove.
577  // Contact Viatcheslav Ostapenko at sl.ostapenko@samsung.com for more
578  // information.
579  virtual LocationProvider* OverrideSystemLocationProvider();
580
581  // Allows an embedder to return its own VibrationProvider implementation.
582  // Return NULL to use the default one for the platform to be created.
583  // FYI: Used by an external project; please don't remove.
584  // Contact Viatcheslav Ostapenko at sl.ostapenko@samsung.com for more
585  // information.
586  virtual VibrationProvider* OverrideVibrationProvider();
587
588#if defined(OS_POSIX) && !defined(OS_MACOSX)
589  // Populates |mappings| with all files that need to be mapped before launching
590  // a child process.
591  virtual void GetAdditionalMappedFilesForChildProcess(
592      const CommandLine& command_line,
593      int child_process_id,
594      std::vector<FileDescriptorInfo>* mappings) {}
595#endif
596
597#if defined(OS_WIN)
598  // Returns the name of the dll that contains cursors and other resources.
599  virtual const wchar_t* GetResourceDllName();
600
601  // This is called on the PROCESS_LAUNCHER thread before the renderer process
602  // is launched. It gives the embedder a chance to add loosen the sandbox
603  // policy.
604  virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy,
605                                bool* success) {}
606#endif
607
608#if defined(USE_NSS)
609  // Return a delegate to authenticate and unlock |module|.
610  // This is called on a worker thread.
611  virtual
612      crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
613          const GURL& url);
614#endif
615
616  // Returns true if plugin referred to by the url can use
617  // pp::FileIO::RequestOSFileHandle.
618  virtual bool IsPluginAllowedToCallRequestOSFileHandle(
619      content::BrowserContext* browser_context,
620      const GURL& url);
621};
622
623}  // namespace content
624
625#endif  // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
626