| 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_ANDROID_CONTENT_VIEW_CORE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/public/browser/readback_types.h" | 14 #include "content/public/browser/readback_types.h" |
| 15 #include "ui/android/view_android.h" | 15 #include "ui/android/view_android.h" |
| 16 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
| 17 | 17 |
| 18 namespace ui { | 18 namespace ui { |
| 19 class WindowAndroid; | 19 class WindowAndroid; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 | 23 |
| 24 class WebContents; | 24 class WebContents; |
| 25 struct ContextMenuParams; |
| 25 | 26 |
| 26 // DEPRECATED. Do not add methods. | 27 // DEPRECATED. Do not add methods. |
| 27 // Refer to the public WebContents interface or elsewhere instead. | 28 // Refer to the public WebContents interface or elsewhere instead. |
| 28 class CONTENT_EXPORT ContentViewCore { | 29 class CONTENT_EXPORT ContentViewCore { |
| 29 public: | 30 public: |
| 30 // Returns the existing ContentViewCore for |web_contents|, or nullptr. | 31 // Returns the existing ContentViewCore for |web_contents|, or nullptr. |
| 31 static ContentViewCore* FromWebContents(WebContents* web_contents); | 32 static ContentViewCore* FromWebContents(WebContents* web_contents); |
| 32 | 33 |
| 33 virtual WebContents* GetWebContents() const = 0; | 34 virtual WebContents* GetWebContents() const = 0; |
| 34 | 35 |
| 35 // May return null reference. | 36 // May return null reference. |
| 36 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; | 37 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; |
| 37 virtual void ShowPastePopup(int x, int y) = 0; | 38 virtual bool ShowPastePopup(const ContextMenuParams& params) = 0; |
| 38 | 39 |
| 39 virtual ui::WindowAndroid* GetWindowAndroid() const = 0; | 40 virtual ui::WindowAndroid* GetWindowAndroid() const = 0; |
| 40 | 41 |
| 41 protected: | 42 protected: |
| 42 ~ContentViewCore() {} | 43 ~ContentViewCore() {} |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 }; // namespace content | 46 }; // namespace content |
| 46 | 47 |
| 47 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ | 48 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ |
| OLD | NEW |