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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 const base::string16& search_text, | 569 const base::string16& search_text, |
570 const blink::WebFindOptions& options) = 0; | 570 const blink::WebFindOptions& options) = 0; |
571 | 571 |
572 // Notifies the renderer that the user has closed the FindInPage window | 572 // Notifies the renderer that the user has closed the FindInPage window |
573 // (and what action to take regarding the selection). | 573 // (and what action to take regarding the selection). |
574 virtual void StopFinding(StopFindAction action) = 0; | 574 virtual void StopFinding(StopFindAction action) = 0; |
575 | 575 |
576 // Requests the renderer to insert CSS into the main frame's document. | 576 // Requests the renderer to insert CSS into the main frame's document. |
577 virtual void InsertCSS(const std::string& css) = 0; | 577 virtual void InsertCSS(const std::string& css) = 0; |
578 | 578 |
| 579 // Returns true if audio has recently been audible from the WebContents. |
| 580 virtual bool WasRecentlyAudible() = 0; |
| 581 |
579 #if defined(OS_ANDROID) | 582 #if defined(OS_ANDROID) |
580 CONTENT_EXPORT static WebContents* FromJavaWebContents( | 583 CONTENT_EXPORT static WebContents* FromJavaWebContents( |
581 jobject jweb_contents_android); | 584 jobject jweb_contents_android); |
582 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; | 585 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; |
583 #elif defined(OS_MACOSX) | 586 #elif defined(OS_MACOSX) |
584 // Allowing other views disables optimizations which assume that only a single | 587 // Allowing other views disables optimizations which assume that only a single |
585 // WebContents is present. | 588 // WebContents is present. |
586 virtual void SetAllowOtherViews(bool allow) = 0; | 589 virtual void SetAllowOtherViews(bool allow) = 0; |
587 | 590 |
588 // Returns true if other views are allowed, false otherwise. | 591 // Returns true if other views are allowed, false otherwise. |
589 virtual bool GetAllowOtherViews() = 0; | 592 virtual bool GetAllowOtherViews() = 0; |
590 #endif // OS_ANDROID | 593 #endif // OS_ANDROID |
591 | 594 |
592 private: | 595 private: |
593 // This interface should only be implemented inside content. | 596 // This interface should only be implemented inside content. |
594 friend class WebContentsImpl; | 597 friend class WebContentsImpl; |
595 WebContents() {} | 598 WebContents() {} |
596 }; | 599 }; |
597 | 600 |
598 } // namespace content | 601 } // namespace content |
599 | 602 |
600 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 603 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |