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