| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // Binds this WebContentsDelegateAndroid to the passed WebContents instance, | 52 // Binds this WebContentsDelegateAndroid to the passed WebContents instance, |
| 53 // such that when that WebContents is destroyed, this | 53 // such that when that WebContents is destroyed, this |
| 54 // WebContentsDelegateAndroid instance will be destroyed too. | 54 // WebContentsDelegateAndroid instance will be destroyed too. |
| 55 void SetOwnerWebContents(content::WebContents* contents); | 55 void SetOwnerWebContents(content::WebContents* contents); |
| 56 | 56 |
| 57 // Overridden from WebContentsDelegate: | 57 // Overridden from WebContentsDelegate: |
| 58 virtual content::WebContents* OpenURLFromTab( | 58 virtual content::WebContents* OpenURLFromTab( |
| 59 content::WebContents* source, | 59 content::WebContents* source, |
| 60 const content::OpenURLParams& params) OVERRIDE; | 60 const content::OpenURLParams& params) OVERRIDE; |
| 61 virtual bool ShouldIgnoreNavigation( | |
| 62 content::WebContents* source, | |
| 63 const GURL& url, | |
| 64 const content::Referrer& referrer, | |
| 65 WindowOpenDisposition disposition, | |
| 66 content::PageTransition transition_type) OVERRIDE; | |
| 67 virtual void NavigationStateChanged(const content::WebContents* source, | 61 virtual void NavigationStateChanged(const content::WebContents* source, |
| 68 unsigned changed_flags) OVERRIDE; | 62 unsigned changed_flags) OVERRIDE; |
| 69 virtual void AddNewContents(content::WebContents* source, | 63 virtual void AddNewContents(content::WebContents* source, |
| 70 content::WebContents* new_contents, | 64 content::WebContents* new_contents, |
| 71 WindowOpenDisposition disposition, | 65 WindowOpenDisposition disposition, |
| 72 const gfx::Rect& initial_pos, | 66 const gfx::Rect& initial_pos, |
| 73 bool user_gesture, | 67 bool user_gesture, |
| 74 bool* was_blocked) OVERRIDE; | 68 bool* was_blocked) OVERRIDE; |
| 75 virtual void ActivateContents(content::WebContents* contents) OVERRIDE; | 69 virtual void ActivateContents(content::WebContents* contents) OVERRIDE; |
| 76 virtual void DeactivateContents(content::WebContents* contents) OVERRIDE; | 70 virtual void DeactivateContents(content::WebContents* contents) OVERRIDE; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 89 // See http://b/issue?id=5862108 | 83 // See http://b/issue?id=5862108 |
| 90 virtual void URLStarredChanged(content::WebContents* source, bool starred); | 84 virtual void URLStarredChanged(content::WebContents* source, bool starred); |
| 91 virtual void UpdateTargetURL(content::WebContents* source, | 85 virtual void UpdateTargetURL(content::WebContents* source, |
| 92 int32 page_id, | 86 int32 page_id, |
| 93 const GURL& url) OVERRIDE; | 87 const GURL& url) OVERRIDE; |
| 94 virtual bool CanDownload(content::RenderViewHost* source, | 88 virtual bool CanDownload(content::RenderViewHost* source, |
| 95 int request_id, | 89 int request_id, |
| 96 const std::string& request_method) OVERRIDE; | 90 const std::string& request_method) OVERRIDE; |
| 97 virtual void OnStartDownload(content::WebContents* source, | 91 virtual void OnStartDownload(content::WebContents* source, |
| 98 content::DownloadItem* download) OVERRIDE; | 92 content::DownloadItem* download) OVERRIDE; |
| 99 virtual bool ShouldOverrideLoading(const GURL& url) OVERRIDE; | |
| 100 virtual void HandleKeyboardEvent( | 93 virtual void HandleKeyboardEvent( |
| 101 content::WebContents* source, | 94 content::WebContents* source, |
| 102 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 95 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 103 virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator() | 96 virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator() |
| 104 OVERRIDE; | 97 OVERRIDE; |
| 105 virtual bool TakeFocus(content::WebContents* source, bool reverse) OVERRIDE; | 98 virtual bool TakeFocus(content::WebContents* source, bool reverse) OVERRIDE; |
| 106 | 99 |
| 107 void SetJavaScriptDialogCreator( | 100 void SetJavaScriptDialogCreator( |
| 108 content::JavaScriptDialogCreator* javascript_dialog_creator) { | 101 content::JavaScriptDialogCreator* javascript_dialog_creator) { |
| 109 javascript_dialog_creator_ = javascript_dialog_creator; | 102 javascript_dialog_creator_ = javascript_dialog_creator; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 120 | 113 |
| 121 // The object responsible for creating JavaScript dialogs. | 114 // The object responsible for creating JavaScript dialogs. |
| 122 content::JavaScriptDialogCreator* javascript_dialog_creator_; | 115 content::JavaScriptDialogCreator* javascript_dialog_creator_; |
| 123 }; | 116 }; |
| 124 | 117 |
| 125 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); | 118 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); |
| 126 | 119 |
| 127 } // namespace web_contents_delegate_android | 120 } // namespace web_contents_delegate_android |
| 128 | 121 |
| 129 #endif // CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_D
ELEGATE_ANDROID_H_ | 122 #endif // CHROME_BROWSER_COMPONENT_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_D
ELEGATE_ANDROID_H_ |
| OLD | NEW |