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 |
30 // Chromium Android specific WebContentsDelegate. | 40 // Chromium Android specific WebContentsDelegate. |
31 // Should contain any WebContentsDelegate implementations required by | 41 // Should contain any WebContentsDelegate implementations required by |
32 // the Chromium Android port but not to be shared with WebView. | 42 // the Chromium Android port but not to be shared with WebView. |
33 class ChromeWebContentsDelegateAndroid | 43 class ChromeWebContentsDelegateAndroid |
34 : public web_contents_delegate_android::WebContentsDelegateAndroid, | 44 : public web_contents_delegate_android::WebContentsDelegateAndroid, |
35 public content::NotificationObserver { | 45 public content::NotificationObserver { |
36 public: | 46 public: |
37 ChromeWebContentsDelegateAndroid(JNIEnv* env, jobject obj); | 47 ChromeWebContentsDelegateAndroid(JNIEnv* env, jobject obj); |
38 virtual ~ChromeWebContentsDelegateAndroid(); | 48 virtual ~ChromeWebContentsDelegateAndroid(); |
39 | 49 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 content::NotificationRegistrar notification_registrar_; | 99 content::NotificationRegistrar notification_registrar_; |
90 }; | 100 }; |
91 | 101 |
92 // Register the native methods through JNI. | 102 // Register the native methods through JNI. |
93 bool RegisterChromeWebContentsDelegateAndroid(JNIEnv* env); | 103 bool RegisterChromeWebContentsDelegateAndroid(JNIEnv* env); |
94 | 104 |
95 } // namespace android | 105 } // namespace android |
96 } // namespace chrome | 106 } // namespace chrome |
97 | 107 |
98 #endif // CHROME_BROWSER_ANDROID_CHROME_WEB_CONTENTS_DELEGATE_ANDROID_H_ | 108 #endif // CHROME_BROWSER_ANDROID_CHROME_WEB_CONTENTS_DELEGATE_ANDROID_H_ |
OLD | NEW |