| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 const base::Callback<void(bool)>& callback); | 444 const base::Callback<void(bool)>& callback); |
| 445 | 445 |
| 446 // Returns the size for the new render view created for the pending entry in | 446 // Returns the size for the new render view created for the pending entry in |
| 447 // |web_contents|; if there's no size, returns an empty size. | 447 // |web_contents|; if there's no size, returns an empty size. |
| 448 // This is optional for implementations of WebContentsDelegate; if the | 448 // This is optional for implementations of WebContentsDelegate; if the |
| 449 // delegate doesn't provide a size, the current WebContentsView's size will be | 449 // delegate doesn't provide a size, the current WebContentsView's size will be |
| 450 // used. | 450 // used. |
| 451 virtual gfx::Size GetSizeForNewRenderView( | 451 virtual gfx::Size GetSizeForNewRenderView( |
| 452 const WebContents* web_contents) const; | 452 const WebContents* web_contents) const; |
| 453 | 453 |
| 454 // Requests presentation mode, similar to fullscreen mode for a newly |
| 455 // created window. |
| 456 virtual void RequestPresentationMode(); |
| 457 |
| 454 protected: | 458 protected: |
| 455 virtual ~WebContentsDelegate(); | 459 virtual ~WebContentsDelegate(); |
| 456 | 460 |
| 457 private: | 461 private: |
| 458 friend class WebContentsImpl; | 462 friend class WebContentsImpl; |
| 459 | 463 |
| 460 // Called when |this| becomes the WebContentsDelegate for |source|. | 464 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 461 void Attach(WebContents* source); | 465 void Attach(WebContents* source); |
| 462 | 466 |
| 463 // Called when |this| is no longer the WebContentsDelegate for |source|. | 467 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 464 void Detach(WebContents* source); | 468 void Detach(WebContents* source); |
| 465 | 469 |
| 466 // The WebContents that this is currently a delegate for. | 470 // The WebContents that this is currently a delegate for. |
| 467 std::set<WebContents*> attached_contents_; | 471 std::set<WebContents*> attached_contents_; |
| 468 }; | 472 }; |
| 469 | 473 |
| 470 } // namespace content | 474 } // namespace content |
| 471 | 475 |
| 472 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 476 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |