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