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 CHROME_BROWSER_ANDROID_CHROME_WEB_CONTENTS_DELEGATE_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_CHROME_WEB_CONTENTS_DELEGATE_ANDROID_H_ |
6 #define CHROME_BROWSER_ANDROID_CHROME_WEB_CONTENTS_DELEGATE_ANDROID_H_ | 6 #define CHROME_BROWSER_ANDROID_CHROME_WEB_CONTENTS_DELEGATE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "components/web_contents_delegate_android/web_contents_delegate_android
.h" | 11 #include "components/web_contents_delegate_android/web_contents_delegate_android
.h" |
12 #include "content/public/browser/notification_observer.h" | 12 #include "content/public/browser/notification_observer.h" |
13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
14 | 14 |
15 class FindNotificationDetails; | 15 class FindNotificationDetails; |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 struct FileChooserParams; | 18 struct FileChooserParams; |
19 class WebContents; | 19 class WebContents; |
20 } | 20 } |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 class Rect; | 23 class Rect; |
24 class RectF; | 24 class RectF; |
25 } | 25 } |
26 | 26 |
27 namespace chrome { | 27 namespace chrome { |
28 namespace android { | 28 namespace android { |
29 | 29 |
30 // An enum with the result of calling AddNewContents() in Java. | |
31 // | |
32 // A Java counterpart will be generated for this enum. | |
33 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser | |
34 enum AddWebContentsResult { | |
35 ADD_WEB_CONTENTS_RESULT_PROCEED, | |
36 ADD_WEB_CONTENTS_RESULT_STOP_LOAD, | |
37 ADD_WEB_CONTENTS_RESULT_STOP_LOAD_AND_DELETE | |
38 }; | |
39 | |
40 // Chromium Android specific WebContentsDelegate. | 30 // Chromium Android specific WebContentsDelegate. |
41 // Should contain any WebContentsDelegate implementations required by | 31 // Should contain any WebContentsDelegate implementations required by |
42 // the Chromium Android port but not to be shared with WebView. | 32 // the Chromium Android port but not to be shared with WebView. |
43 class ChromeWebContentsDelegateAndroid | 33 class ChromeWebContentsDelegateAndroid |
44 : public web_contents_delegate_android::WebContentsDelegateAndroid, | 34 : public web_contents_delegate_android::WebContentsDelegateAndroid, |
45 public content::NotificationObserver { | 35 public content::NotificationObserver { |
46 public: | 36 public: |
47 ChromeWebContentsDelegateAndroid(JNIEnv* env, jobject obj); | 37 ChromeWebContentsDelegateAndroid(JNIEnv* env, jobject obj); |
48 virtual ~ChromeWebContentsDelegateAndroid(); | 38 virtual ~ChromeWebContentsDelegateAndroid(); |
49 | 39 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 content::NotificationRegistrar notification_registrar_; | 89 content::NotificationRegistrar notification_registrar_; |
100 }; | 90 }; |
101 | 91 |
102 // Register the native methods through JNI. | 92 // Register the native methods through JNI. |
103 bool RegisterChromeWebContentsDelegateAndroid(JNIEnv* env); | 93 bool RegisterChromeWebContentsDelegateAndroid(JNIEnv* env); |
104 | 94 |
105 } // namespace android | 95 } // namespace android |
106 } // namespace chrome | 96 } // namespace chrome |
107 | 97 |
108 #endif // CHROME_BROWSER_ANDROID_CHROME_WEB_CONTENTS_DELEGATE_ANDROID_H_ | 98 #endif // CHROME_BROWSER_ANDROID_CHROME_WEB_CONTENTS_DELEGATE_ANDROID_H_ |
OLD | NEW |