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 | |
582 #if defined(OS_ANDROID) | 579 #if defined(OS_ANDROID) |
583 CONTENT_EXPORT static WebContents* FromJavaWebContents( | 580 CONTENT_EXPORT static WebContents* FromJavaWebContents( |
584 jobject jweb_contents_android); | 581 jobject jweb_contents_android); |
585 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; | 582 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; |
586 #elif defined(OS_MACOSX) | 583 #elif defined(OS_MACOSX) |
587 // Allowing other views disables optimizations which assume that only a single | 584 // Allowing other views disables optimizations which assume that only a single |
588 // WebContents is present. | 585 // WebContents is present. |
589 virtual void SetAllowOtherViews(bool allow) = 0; | 586 virtual void SetAllowOtherViews(bool allow) = 0; |
590 | 587 |
591 // Returns true if other views are allowed, false otherwise. | 588 // Returns true if other views are allowed, false otherwise. |
592 virtual bool GetAllowOtherViews() = 0; | 589 virtual bool GetAllowOtherViews() = 0; |
593 #endif // OS_ANDROID | 590 #endif // OS_ANDROID |
594 | 591 |
595 private: | 592 private: |
596 // This interface should only be implemented inside content. | 593 // This interface should only be implemented inside content. |
597 friend class WebContentsImpl; | 594 friend class WebContentsImpl; |
598 WebContents() {} | 595 WebContents() {} |
599 }; | 596 }; |
600 | 597 |
601 } // namespace content | 598 } // namespace content |
602 | 599 |
603 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 600 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |