Chromium Code Reviews| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 | 46 |
| 47 class BrowserContext; | 47 class BrowserContext; |
| 48 class BrowserPluginGuestDelegate; | 48 class BrowserPluginGuestDelegate; |
| 49 class InterstitialPage; | 49 class InterstitialPage; |
| 50 class PageState; | 50 class PageState; |
| 51 class RenderFrameHost; | 51 class RenderFrameHost; |
| 52 class RenderProcessHost; | 52 class RenderProcessHost; |
| 53 class RenderViewHost; | 53 class RenderViewHost; |
| 54 class RenderWidgetHostView; | 54 class RenderWidgetHostView; |
| 55 class SiteInstance; | 55 class SiteInstance; |
| 56 class WebContentsAndroid; | |
| 56 class WebContentsDelegate; | 57 class WebContentsDelegate; |
| 57 struct CustomContextMenuContext; | 58 struct CustomContextMenuContext; |
| 58 struct DropData; | 59 struct DropData; |
| 59 struct RendererPreferences; | 60 struct RendererPreferences; |
| 60 | 61 |
| 61 // WebContents is the core class in content/. A WebContents renders web content | 62 // WebContents is the core class in content/. A WebContents renders web content |
| 62 // (usually HTML) in a rectangular area. | 63 // (usually HTML) in a rectangular area. |
| 63 // | 64 // |
| 64 // Instantiating one is simple: | 65 // Instantiating one is simple: |
| 65 // scoped_ptr<content::WebContents> web_contents( | 66 // scoped_ptr<content::WebContents> web_contents( |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 572 // (and what action to take regarding the selection). | 573 // (and what action to take regarding the selection). |
| 573 virtual void StopFinding(StopFindAction action) = 0; | 574 virtual void StopFinding(StopFindAction action) = 0; |
| 574 | 575 |
| 575 // 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. |
| 576 virtual void InsertCSS(const std::string& css) = 0; | 577 virtual void InsertCSS(const std::string& css) = 0; |
| 577 | 578 |
| 578 #if defined(OS_ANDROID) | 579 #if defined(OS_ANDROID) |
| 579 CONTENT_EXPORT static WebContents* FromJavaWebContents( | 580 CONTENT_EXPORT static WebContents* FromJavaWebContents( |
| 580 jobject jweb_contents_android); | 581 jobject jweb_contents_android); |
| 581 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; | 582 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; |
| 583 virtual WebContentsAndroid* GetWebContentsAndroid() = 0; | |
|
Avi (use Gerrit)
2014/08/08 15:23:25
I don't get the relationship here.
From line 582
AKVT
2014/08/08 16:15:51
Thanks, I think GetNativeWebContents() suits corre
Avi (use Gerrit)
2014/08/08 16:26:04
The name GetWebContentsAndroid is fine if you rena
| |
| 582 #elif defined(OS_MACOSX) | 584 #elif defined(OS_MACOSX) |
| 583 // The web contents view assumes that its view will never be overlapped by | 585 // The web contents view assumes that its view will never be overlapped by |
| 584 // another view (either partially or fully). This allows it to perform | 586 // another view (either partially or fully). This allows it to perform |
| 585 // optimizations. If the view is in a view hierarchy where it might be | 587 // optimizations. If the view is in a view hierarchy where it might be |
| 586 // overlapped by another view, notify the view by calling this with |true|. | 588 // overlapped by another view, notify the view by calling this with |true|. |
| 587 virtual void SetAllowOverlappingViews(bool overlapping) = 0; | 589 virtual void SetAllowOverlappingViews(bool overlapping) = 0; |
| 588 | 590 |
| 589 // Returns true if overlapping views are allowed, false otherwise. | 591 // Returns true if overlapping views are allowed, false otherwise. |
| 590 virtual bool GetAllowOverlappingViews() = 0; | 592 virtual bool GetAllowOverlappingViews() = 0; |
| 591 | 593 |
| 592 // Allowing other views disables optimizations which assume that only a single | 594 // Allowing other views disables optimizations which assume that only a single |
| 593 // WebContents is present. | 595 // WebContents is present. |
| 594 virtual void SetAllowOtherViews(bool allow) = 0; | 596 virtual void SetAllowOtherViews(bool allow) = 0; |
| 595 | 597 |
| 596 // Returns true if other views are allowed, false otherwise. | 598 // Returns true if other views are allowed, false otherwise. |
| 597 virtual bool GetAllowOtherViews() = 0; | 599 virtual bool GetAllowOtherViews() = 0; |
| 598 #endif // OS_ANDROID | 600 #endif // OS_ANDROID |
| 599 | 601 |
| 600 private: | 602 private: |
| 601 // This interface should only be implemented inside content. | 603 // This interface should only be implemented inside content. |
| 602 friend class WebContentsImpl; | 604 friend class WebContentsImpl; |
| 603 WebContents() {} | 605 WebContents() {} |
| 604 }; | 606 }; |
| 605 | 607 |
| 606 } // namespace content | 608 } // namespace content |
| 607 | 609 |
| 608 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 610 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |