| 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_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 // browser fullscreen. | 689 // browser fullscreen. |
| 690 virtual void ExitFullscreen(bool will_cause_resize) = 0; | 690 virtual void ExitFullscreen(bool will_cause_resize) = 0; |
| 691 | 691 |
| 692 // Unblocks requests from renderer for a newly created window. This is | 692 // Unblocks requests from renderer for a newly created window. This is |
| 693 // used in showCreatedWindow() or sometimes later in cases where | 693 // used in showCreatedWindow() or sometimes later in cases where |
| 694 // delegate->ShouldResumeRequestsForCreatedWindow() indicated the requests | 694 // delegate->ShouldResumeRequestsForCreatedWindow() indicated the requests |
| 695 // should not yet be resumed. Then the client is responsible for calling this | 695 // should not yet be resumed. Then the client is responsible for calling this |
| 696 // as soon as they are ready. | 696 // as soon as they are ready. |
| 697 virtual void ResumeLoadingCreatedWebContents() = 0; | 697 virtual void ResumeLoadingCreatedWebContents() = 0; |
| 698 | 698 |
| 699 #if defined(OS_ANDROID) | |
| 700 // Requests to resume the current media session. | 699 // Requests to resume the current media session. |
| 701 virtual void ResumeMediaSession() = 0; | 700 virtual void ResumeMediaSession() = 0; |
| 702 // Requests to suspend the current media session. | 701 // Requests to suspend the current media session. |
| 703 virtual void SuspendMediaSession() = 0; | 702 virtual void SuspendMediaSession() = 0; |
| 704 // Requests to stop the current media session. | 703 // Requests to stop the current media session. |
| 705 virtual void StopMediaSession() = 0; | 704 virtual void StopMediaSession() = 0; |
| 706 | 705 |
| 706 #if defined(OS_ANDROID) |
| 707 CONTENT_EXPORT static WebContents* FromJavaWebContents( | 707 CONTENT_EXPORT static WebContents* FromJavaWebContents( |
| 708 jobject jweb_contents_android); | 708 jobject jweb_contents_android); |
| 709 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; | 709 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; |
| 710 #elif defined(OS_MACOSX) | 710 #elif defined(OS_MACOSX) |
| 711 // Allowing other views disables optimizations which assume that only a single | 711 // Allowing other views disables optimizations which assume that only a single |
| 712 // WebContents is present. | 712 // WebContents is present. |
| 713 virtual void SetAllowOtherViews(bool allow) = 0; | 713 virtual void SetAllowOtherViews(bool allow) = 0; |
| 714 | 714 |
| 715 // Returns true if other views are allowed, false otherwise. | 715 // Returns true if other views are allowed, false otherwise. |
| 716 virtual bool GetAllowOtherViews() = 0; | 716 virtual bool GetAllowOtherViews() = 0; |
| 717 #endif // OS_ANDROID | 717 #endif // OS_ANDROID |
| 718 | 718 |
| 719 private: | 719 private: |
| 720 // This interface should only be implemented inside content. | 720 // This interface should only be implemented inside content. |
| 721 friend class WebContentsImpl; | 721 friend class WebContentsImpl; |
| 722 WebContents() {} | 722 WebContents() {} |
| 723 }; | 723 }; |
| 724 | 724 |
| 725 } // namespace content | 725 } // namespace content |
| 726 | 726 |
| 727 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 727 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |