Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: components/web_contents_delegate_android/web_contents_delegate_android.h

Issue 2233213002: [Android] Suppress javascript dialogs from background tabs in custom tab Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 10 #include <memory>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const content::WebContents* web_contents) const override; 108 const content::WebContents* web_contents) const override;
109 void ShowValidationMessage(content::WebContents* web_contents, 109 void ShowValidationMessage(content::WebContents* web_contents,
110 const gfx::Rect& anchor_in_root_view, 110 const gfx::Rect& anchor_in_root_view,
111 const base::string16& main_text, 111 const base::string16& main_text,
112 const base::string16& sub_text) override; 112 const base::string16& sub_text) override;
113 void HideValidationMessage(content::WebContents* web_contents) override; 113 void HideValidationMessage(content::WebContents* web_contents) override;
114 void MoveValidationMessage(content::WebContents* web_contents, 114 void MoveValidationMessage(content::WebContents* web_contents,
115 const gfx::Rect& anchor_in_root_view) override; 115 const gfx::Rect& anchor_in_root_view) override;
116 void RequestAppBannerFromDevTools( 116 void RequestAppBannerFromDevTools(
117 content::WebContents* web_contents) override; 117 content::WebContents* web_contents) override;
118 bool ShouldSuppressDialogs(content::WebContents* web_contents) override;
118 119
119 protected: 120 protected:
120 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const; 121 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const;
121 122
122 private: 123 private:
123 // We depend on the java side user of WebContentDelegateAndroid to hold a 124 // 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 125 // 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. 126 // on it. Using a weak ref here allows it to be correctly GCed.
126 JavaObjectWeakGlobalRef weak_java_delegate_; 127 JavaObjectWeakGlobalRef weak_java_delegate_;
127 128
128 std::unique_ptr<ValidationMessageBubbleAndroid> validation_message_bubble_; 129 std::unique_ptr<ValidationMessageBubbleAndroid> validation_message_bubble_;
129 }; 130 };
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698