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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 #if defined(OS_ANDROID) | 579 #if defined(OS_ANDROID) |
580 CONTENT_EXPORT static WebContents* FromJavaWebContents( | 580 CONTENT_EXPORT static WebContents* FromJavaWebContents( |
581 jobject jweb_contents_android); | 581 jobject jweb_contents_android); |
582 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; | 582 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; |
583 #elif defined(OS_MACOSX) | 583 #elif defined(OS_MACOSX) |
584 // The web contents view assumes that its view will never be overlapped by | |
585 // another view (either partially or fully). This allows it to perform | |
586 // optimizations. If the view is in a view hierarchy where it might be | |
587 // overlapped by another view, notify the view by calling this with |true|. | |
588 virtual void SetAllowOverlappingViews(bool overlapping) = 0; | |
589 | |
590 // Returns true if overlapping views are allowed, false otherwise. | |
591 virtual bool GetAllowOverlappingViews() = 0; | |
592 | |
593 // Allowing other views disables optimizations which assume that only a single | 584 // Allowing other views disables optimizations which assume that only a single |
594 // WebContents is present. | 585 // WebContents is present. |
595 virtual void SetAllowOtherViews(bool allow) = 0; | 586 virtual void SetAllowOtherViews(bool allow) = 0; |
596 | 587 |
597 // Returns true if other views are allowed, false otherwise. | 588 // Returns true if other views are allowed, false otherwise. |
598 virtual bool GetAllowOtherViews() = 0; | 589 virtual bool GetAllowOtherViews() = 0; |
599 #endif // OS_ANDROID | 590 #endif // OS_ANDROID |
600 | 591 |
601 private: | 592 private: |
602 // This interface should only be implemented inside content. | 593 // This interface should only be implemented inside content. |
603 friend class WebContentsImpl; | 594 friend class WebContentsImpl; |
604 WebContents() {} | 595 WebContents() {} |
605 }; | 596 }; |
606 | 597 |
607 } // namespace content | 598 } // namespace content |
608 | 599 |
609 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 600 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |