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 <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 // as soon as they are ready. | 680 // as soon as they are ready. |
681 virtual void ResumeLoadingCreatedWebContents() = 0; | 681 virtual void ResumeLoadingCreatedWebContents() = 0; |
682 | 682 |
683 #if defined(OS_ANDROID) | 683 #if defined(OS_ANDROID) |
684 // Requests to resume the current media session. | 684 // Requests to resume the current media session. |
685 virtual void ResumeMediaSession() = 0; | 685 virtual void ResumeMediaSession() = 0; |
686 // Requests to suspend the current media session. | 686 // Requests to suspend the current media session. |
687 virtual void SuspendMediaSession() = 0; | 687 virtual void SuspendMediaSession() = 0; |
688 // Requests to stop the current media session. | 688 // Requests to stop the current media session. |
689 virtual void StopMediaSession() = 0; | 689 virtual void StopMediaSession() = 0; |
690 | 690 #if !defined(USE_AURA) |
691 CONTENT_EXPORT static WebContents* FromJavaWebContents( | 691 CONTENT_EXPORT static WebContents* FromJavaWebContents( |
692 jobject jweb_contents_android); | 692 jobject jweb_contents_android); |
693 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; | 693 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; |
| 694 #endif // !USE_AURA |
694 #elif defined(OS_MACOSX) | 695 #elif defined(OS_MACOSX) |
695 // Allowing other views disables optimizations which assume that only a single | 696 // Allowing other views disables optimizations which assume that only a single |
696 // WebContents is present. | 697 // WebContents is present. |
697 virtual void SetAllowOtherViews(bool allow) = 0; | 698 virtual void SetAllowOtherViews(bool allow) = 0; |
698 | 699 |
699 // Returns true if other views are allowed, false otherwise. | 700 // Returns true if other views are allowed, false otherwise. |
700 virtual bool GetAllowOtherViews() = 0; | 701 virtual bool GetAllowOtherViews() = 0; |
701 #endif // OS_ANDROID | 702 #endif // OS_ANDROID |
702 | 703 |
703 private: | 704 private: |
704 // This interface should only be implemented inside content. | 705 // This interface should only be implemented inside content. |
705 friend class WebContentsImpl; | 706 friend class WebContentsImpl; |
706 WebContents() {} | 707 WebContents() {} |
707 }; | 708 }; |
708 | 709 |
709 } // namespace content | 710 } // namespace content |
710 | 711 |
711 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 712 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |