Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 364 virtual void EnumerateDirectory(WebContents* web_contents, | 364 virtual void EnumerateDirectory(WebContents* web_contents, |
| 365 int request_id, | 365 int request_id, |
| 366 const base::FilePath& path) {} | 366 const base::FilePath& path) {} |
| 367 | 367 |
| 368 // Returns true if the delegate will embed a WebContents-owned fullscreen | 368 // Returns true if the delegate will embed a WebContents-owned fullscreen |
| 369 // render widget. In this case, the delegate may access the widget by calling | 369 // render widget. In this case, the delegate may access the widget by calling |
| 370 // WebContents::GetFullscreenRenderWidgetHostView(). If false is returned, | 370 // WebContents::GetFullscreenRenderWidgetHostView(). If false is returned, |
| 371 // WebContents will be responsible for showing the fullscreen widget. | 371 // WebContents will be responsible for showing the fullscreen widget. |
| 372 virtual bool EmbedsFullscreenWidget() const; | 372 virtual bool EmbedsFullscreenWidget() const; |
| 373 | 373 |
| 374 // Called when the renderer puts a tab into or out of fullscreen mode. | 374 // Called when the renderer puts a tab into fullscreen mode. |
| 375 virtual void ToggleFullscreenModeForTab(WebContents* web_contents, | 375 // |origin| is the origin of the initiating frame inside the |web_contents|. |
| 376 bool enter_fullscreen) {} | 376 // |origin| can be empty in which case, the |web_contents| last committed |
|
Charlie Reis
2014/12/10 19:22:57
nit: no comma
mlamouri (slow - plz ping)
2014/12/11 16:03:20
Done.
| |
| 377 // URL's origin should be used. | |
| 378 virtual void EnterFullscreenModeForTab(WebContents* web_contents, | |
| 379 const GURL& origin) {} | |
| 380 | |
| 381 // Called when the renderer puts a tab out of fullscreen mode. | |
| 382 virtual void ExitFullscreenModeForTab(WebContents*) {} | |
| 383 | |
| 377 virtual bool IsFullscreenForTabOrPending( | 384 virtual bool IsFullscreenForTabOrPending( |
| 378 const WebContents* web_contents) const; | 385 const WebContents* web_contents) const; |
| 379 | 386 |
| 380 // Register a new handler for URL requests with the given scheme. | 387 // Register a new handler for URL requests with the given scheme. |
| 381 // |user_gesture| is true if the registration is made in the context of a user | 388 // |user_gesture| is true if the registration is made in the context of a user |
| 382 // gesture. | 389 // gesture. |
| 383 virtual void RegisterProtocolHandler(WebContents* web_contents, | 390 virtual void RegisterProtocolHandler(WebContents* web_contents, |
| 384 const std::string& protocol, | 391 const std::string& protocol, |
| 385 const GURL& url, | 392 const GURL& url, |
| 386 bool user_gesture) {} | 393 bool user_gesture) {} |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 // Called when |this| is no longer the WebContentsDelegate for |source|. | 511 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 505 void Detach(WebContents* source); | 512 void Detach(WebContents* source); |
| 506 | 513 |
| 507 // The WebContents that this is currently a delegate for. | 514 // The WebContents that this is currently a delegate for. |
| 508 std::set<WebContents*> attached_contents_; | 515 std::set<WebContents*> attached_contents_; |
| 509 }; | 516 }; |
| 510 | 517 |
| 511 } // namespace content | 518 } // namespace content |
| 512 | 519 |
| 513 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 520 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |