| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 void ExitFullscreenModeForTab(content::WebContents* web_contents) override; | 105 void ExitFullscreenModeForTab(content::WebContents* web_contents) override; |
| 106 bool IsFullscreenForTabOrPending( | 106 bool IsFullscreenForTabOrPending( |
| 107 const content::WebContents* web_contents) const override; | 107 const content::WebContents* web_contents) const override; |
| 108 void ShowValidationMessage(content::WebContents* web_contents, | 108 void ShowValidationMessage(content::WebContents* web_contents, |
| 109 const gfx::Rect& anchor_in_root_view, | 109 const gfx::Rect& anchor_in_root_view, |
| 110 const base::string16& main_text, | 110 const base::string16& main_text, |
| 111 const base::string16& sub_text) override; | 111 const base::string16& sub_text) override; |
| 112 void HideValidationMessage(content::WebContents* web_contents) override; | 112 void HideValidationMessage(content::WebContents* web_contents) override; |
| 113 void MoveValidationMessage(content::WebContents* web_contents, | 113 void MoveValidationMessage(content::WebContents* web_contents, |
| 114 const gfx::Rect& anchor_in_root_view) override; | 114 const gfx::Rect& anchor_in_root_view) override; |
| 115 bool RequestAppBanner(content::WebContents* web_contents) override; | 115 void RequestAppBannerFromDevTools( |
| 116 content::WebContents* web_contents) override; |
| 116 | 117 |
| 117 protected: | 118 protected: |
| 118 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const; | 119 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const; |
| 119 | 120 |
| 120 private: | 121 private: |
| 121 // We depend on the java side user of WebContentDelegateAndroid to hold a | 122 // We depend on the java side user of WebContentDelegateAndroid to hold a |
| 122 // strong reference to that object as long as they want to receive callbacks | 123 // strong reference to that object as long as they want to receive callbacks |
| 123 // on it. Using a weak ref here allows it to be correctly GCed. | 124 // on it. Using a weak ref here allows it to be correctly GCed. |
| 124 JavaObjectWeakGlobalRef weak_java_delegate_; | 125 JavaObjectWeakGlobalRef weak_java_delegate_; |
| 125 | 126 |
| 126 scoped_ptr<ValidationMessageBubbleAndroid> validation_message_bubble_; | 127 scoped_ptr<ValidationMessageBubbleAndroid> validation_message_bubble_; |
| 127 }; | 128 }; |
| 128 | 129 |
| 129 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); | 130 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); |
| 130 | 131 |
| 131 } // namespace web_contents_delegate_android | 132 } // namespace web_contents_delegate_android |
| 132 | 133 |
| 133 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI
D_H_ | 134 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI
D_H_ |
| OLD | NEW |