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