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_weak_ref.h" | 8 #include "base/android/jni_weak_ref.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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 int32 line_no, | 95 int32 line_no, |
96 const base::string16& source_id) override; | 96 const base::string16& source_id) override; |
97 virtual void UpdateTargetURL(content::WebContents* source, | 97 virtual void UpdateTargetURL(content::WebContents* source, |
98 const GURL& url) override; | 98 const GURL& url) override; |
99 virtual void HandleKeyboardEvent( | 99 virtual void HandleKeyboardEvent( |
100 content::WebContents* source, | 100 content::WebContents* source, |
101 const content::NativeWebKeyboardEvent& event) override; | 101 const content::NativeWebKeyboardEvent& event) override; |
102 virtual bool TakeFocus(content::WebContents* source, bool reverse) override; | 102 virtual bool TakeFocus(content::WebContents* source, bool reverse) override; |
103 virtual void ShowRepostFormWarningDialog( | 103 virtual void ShowRepostFormWarningDialog( |
104 content::WebContents* source) override; | 104 content::WebContents* source) override; |
105 virtual void ToggleFullscreenModeForTab(content::WebContents* web_contents, | 105 virtual void EnterFullscreenModeForTab(content::WebContents* web_contents, |
106 bool enter_fullscreen) override; | 106 const GURL& origin) override; |
| 107 virtual void ExitFullscreenModeForTab( |
| 108 content::WebContents* web_contents) override; |
107 virtual bool IsFullscreenForTabOrPending( | 109 virtual bool IsFullscreenForTabOrPending( |
108 const content::WebContents* web_contents) const override; | 110 const content::WebContents* web_contents) const override; |
109 virtual void ShowValidationMessage(content::WebContents* web_contents, | 111 virtual void ShowValidationMessage(content::WebContents* web_contents, |
110 const gfx::Rect& anchor_in_root_view, | 112 const gfx::Rect& anchor_in_root_view, |
111 const base::string16& main_text, | 113 const base::string16& main_text, |
112 const base::string16& sub_text) override; | 114 const base::string16& sub_text) override; |
113 virtual void HideValidationMessage( | 115 virtual void HideValidationMessage( |
114 content::WebContents* web_contents) override; | 116 content::WebContents* web_contents) override; |
115 virtual void MoveValidationMessage( | 117 virtual void MoveValidationMessage( |
116 content::WebContents* web_contents, | 118 content::WebContents* web_contents, |
117 const gfx::Rect& anchor_in_root_view) override; | 119 const gfx::Rect& anchor_in_root_view) override; |
118 | 120 |
119 protected: | 121 protected: |
120 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const; | 122 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const; |
121 | 123 |
122 private: | 124 private: |
123 // We depend on the java side user of WebContentDelegateAndroid to hold a | 125 // We depend on the java side user of WebContentDelegateAndroid to hold a |
124 // strong reference to that object as long as they want to receive callbacks | 126 // strong reference to that object as long as they want to receive callbacks |
125 // on it. Using a weak ref here allows it to be correctly GCed. | 127 // on it. Using a weak ref here allows it to be correctly GCed. |
126 JavaObjectWeakGlobalRef weak_java_delegate_; | 128 JavaObjectWeakGlobalRef weak_java_delegate_; |
127 | 129 |
128 scoped_ptr<ValidationMessageBubbleAndroid> validation_message_bubble_; | 130 scoped_ptr<ValidationMessageBubbleAndroid> validation_message_bubble_; |
129 }; | 131 }; |
130 | 132 |
131 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); | 133 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); |
132 | 134 |
133 } // namespace web_contents_delegate_android | 135 } // namespace web_contents_delegate_android |
134 | 136 |
135 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI
D_H_ | 137 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI
D_H_ |
OLD | NEW |