| 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_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELE
GATE_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELE
GATE_ANDROID_H_ |
| 6 #define CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELE
GATE_ANDROID_H_ | 6 #define CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELE
GATE_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Binds this WebContentsDelegateAndroid to the passed WebContents instance, | 48 // Binds this WebContentsDelegateAndroid to the passed WebContents instance, |
| 49 // such that when that WebContents is destroyed, this | 49 // such that when that WebContents is destroyed, this |
| 50 // WebContentsDelegateAndroid instance will be destroyed too. | 50 // WebContentsDelegateAndroid instance will be destroyed too. |
| 51 void SetOwnerWebContents(WebContents* contents); | 51 void SetOwnerWebContents(WebContents* contents); |
| 52 | 52 |
| 53 // Overridden from WebContentsDelegate: | 53 // Overridden from WebContentsDelegate: |
| 54 virtual WebContents* OpenURLFromTab( | 54 virtual WebContents* OpenURLFromTab( |
| 55 WebContents* source, | 55 WebContents* source, |
| 56 const OpenURLParams& params) OVERRIDE; | 56 const OpenURLParams& params) OVERRIDE; |
| 57 | 57 |
| 58 virtual content::ColorChooser* OpenColorChooser( |
| 59 content::WebContents* web_contents, int color_chooser_id, |
| 60 SkColor color) OVERRIDE; |
| 58 virtual void NavigationStateChanged(const WebContents* source, | 61 virtual void NavigationStateChanged(const WebContents* source, |
| 59 unsigned changed_flags) OVERRIDE; | 62 unsigned changed_flags) OVERRIDE; |
| 60 virtual void AddNewContents(WebContents* source, | 63 virtual void AddNewContents(WebContents* source, |
| 61 WebContents* new_contents, | 64 WebContents* new_contents, |
| 62 WindowOpenDisposition disposition, | 65 WindowOpenDisposition disposition, |
| 63 const gfx::Rect& initial_pos, | 66 const gfx::Rect& initial_pos, |
| 64 bool user_gesture, | 67 bool user_gesture, |
| 65 bool* was_blocked) OVERRIDE; | 68 bool* was_blocked) OVERRIDE; |
| 66 virtual void ActivateContents(WebContents* contents) OVERRIDE; | 69 virtual void ActivateContents(WebContents* contents) OVERRIDE; |
| 67 virtual void DeactivateContents(WebContents* contents) OVERRIDE; | 70 virtual void DeactivateContents(WebContents* contents) OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // strong reference to that object as long as they want to receive callbacks | 105 // strong reference to that object as long as they want to receive callbacks |
| 103 // on it. Using a weak ref here allows it to be correctly GCed. | 106 // on it. Using a weak ref here allows it to be correctly GCed. |
| 104 JavaObjectWeakGlobalRef weak_java_delegate_; | 107 JavaObjectWeakGlobalRef weak_java_delegate_; |
| 105 }; | 108 }; |
| 106 | 109 |
| 107 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); | 110 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); |
| 108 | 111 |
| 109 } // namespace content | 112 } // namespace content |
| 110 | 113 |
| 111 #endif // CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_D
ELEGATE_ANDROID_H_ | 114 #endif // CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_D
ELEGATE_ANDROID_H_ |
| OLD | NEW |