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 COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROID_H
_ | 5 #ifndef COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROID_H
_ |
6 #define COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROID_H
_ | 6 #define COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROID_H
_ |
7 | 7 |
8 #include "base/android/jni_helper.h" | 8 #include "base/android/jni_helper.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // Binds this WebContentsDelegateAndroid to the passed WebContents instance, | 47 // Binds this WebContentsDelegateAndroid to the passed WebContents instance, |
48 // such that when that WebContents is destroyed, this | 48 // such that when that WebContents is destroyed, this |
49 // WebContentsDelegateAndroid instance will be destroyed too. | 49 // WebContentsDelegateAndroid instance will be destroyed too. |
50 void SetOwnerWebContents(content::WebContents* contents); | 50 void SetOwnerWebContents(content::WebContents* contents); |
51 | 51 |
52 // Overridden from WebContentsDelegate: | 52 // Overridden from WebContentsDelegate: |
53 virtual content::WebContents* OpenURLFromTab( | 53 virtual content::WebContents* OpenURLFromTab( |
54 content::WebContents* source, | 54 content::WebContents* source, |
55 const content::OpenURLParams& params) OVERRIDE; | 55 const content::OpenURLParams& params) OVERRIDE; |
56 virtual content::ColorChooser* OpenColorChooser(content::WebContents* source, | 56 virtual content::ColorChooser* OpenColorChooser( |
57 SkColor color) OVERRIDE; | 57 content::WebContents* source, |
| 58 SkColor color, |
| 59 const std::vector<content::ColorSuggestion>& suggestions) OVERRIDE; |
58 virtual void NavigationStateChanged(const content::WebContents* source, | 60 virtual void NavigationStateChanged(const content::WebContents* source, |
59 unsigned changed_flags) OVERRIDE; | 61 unsigned changed_flags) OVERRIDE; |
60 virtual void ActivateContents(content::WebContents* contents) OVERRIDE; | 62 virtual void ActivateContents(content::WebContents* contents) OVERRIDE; |
61 virtual void DeactivateContents(content::WebContents* contents) OVERRIDE; | 63 virtual void DeactivateContents(content::WebContents* contents) OVERRIDE; |
62 virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE; | 64 virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE; |
63 virtual void LoadProgressChanged(content::WebContents* source, | 65 virtual void LoadProgressChanged(content::WebContents* source, |
64 double load_progress) OVERRIDE; | 66 double load_progress) OVERRIDE; |
65 virtual void RendererUnresponsive(content::WebContents* source) OVERRIDE; | 67 virtual void RendererUnresponsive(content::WebContents* source) OVERRIDE; |
66 virtual void RendererResponsive(content::WebContents* source) OVERRIDE; | 68 virtual void RendererResponsive(content::WebContents* source) OVERRIDE; |
67 virtual void CloseContents(content::WebContents* source) OVERRIDE; | 69 virtual void CloseContents(content::WebContents* source) OVERRIDE; |
(...skipping 29 matching lines...) Expand all Loading... |
97 // strong reference to that object as long as they want to receive callbacks | 99 // strong reference to that object as long as they want to receive callbacks |
98 // on it. Using a weak ref here allows it to be correctly GCed. | 100 // on it. Using a weak ref here allows it to be correctly GCed. |
99 JavaObjectWeakGlobalRef weak_java_delegate_; | 101 JavaObjectWeakGlobalRef weak_java_delegate_; |
100 }; | 102 }; |
101 | 103 |
102 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); | 104 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); |
103 | 105 |
104 } // namespace web_contents_delegate_android | 106 } // namespace web_contents_delegate_android |
105 | 107 |
106 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI
D_H_ | 108 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI
D_H_ |
OLD | NEW |