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

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

Issue 789533002: Fullscreen: make fullscreen requests come from RenderFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make try happy Created 5 years, 11 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 "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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 int32 line_no, 96 int32 line_no,
97 const base::string16& source_id) override; 97 const base::string16& source_id) override;
98 virtual void UpdateTargetURL(content::WebContents* source, 98 virtual void UpdateTargetURL(content::WebContents* source,
99 const GURL& url) override; 99 const GURL& url) override;
100 virtual void HandleKeyboardEvent( 100 virtual void HandleKeyboardEvent(
101 content::WebContents* source, 101 content::WebContents* source,
102 const content::NativeWebKeyboardEvent& event) override; 102 const content::NativeWebKeyboardEvent& event) override;
103 virtual bool TakeFocus(content::WebContents* source, bool reverse) override; 103 virtual bool TakeFocus(content::WebContents* source, bool reverse) override;
104 virtual void ShowRepostFormWarningDialog( 104 virtual void ShowRepostFormWarningDialog(
105 content::WebContents* source) override; 105 content::WebContents* source) override;
106 virtual void ToggleFullscreenModeForTab(content::WebContents* web_contents, 106 virtual void EnterFullscreenModeForTab(content::WebContents* web_contents,
107 bool enter_fullscreen) override; 107 const GURL& origin) override;
108 virtual void ExitFullscreenModeForTab(
109 content::WebContents* web_contents) override;
108 virtual bool IsFullscreenForTabOrPending( 110 virtual bool IsFullscreenForTabOrPending(
109 const content::WebContents* web_contents) const override; 111 const content::WebContents* web_contents) const override;
110 virtual void ShowValidationMessage(content::WebContents* web_contents, 112 virtual void ShowValidationMessage(content::WebContents* web_contents,
111 const gfx::Rect& anchor_in_root_view, 113 const gfx::Rect& anchor_in_root_view,
112 const base::string16& main_text, 114 const base::string16& main_text,
113 const base::string16& sub_text) override; 115 const base::string16& sub_text) override;
114 virtual void HideValidationMessage( 116 virtual void HideValidationMessage(
115 content::WebContents* web_contents) override; 117 content::WebContents* web_contents) override;
116 virtual void MoveValidationMessage( 118 virtual void MoveValidationMessage(
117 content::WebContents* web_contents, 119 content::WebContents* web_contents,
118 const gfx::Rect& anchor_in_root_view) override; 120 const gfx::Rect& anchor_in_root_view) override;
119 121
120 protected: 122 protected:
121 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const; 123 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const;
122 124
123 private: 125 private:
124 // We depend on the java side user of WebContentDelegateAndroid to hold a 126 // We depend on the java side user of WebContentDelegateAndroid to hold a
125 // strong reference to that object as long as they want to receive callbacks 127 // strong reference to that object as long as they want to receive callbacks
126 // on it. Using a weak ref here allows it to be correctly GCed. 128 // on it. Using a weak ref here allows it to be correctly GCed.
127 JavaObjectWeakGlobalRef weak_java_delegate_; 129 JavaObjectWeakGlobalRef weak_java_delegate_;
128 130
129 scoped_ptr<ValidationMessageBubbleAndroid> validation_message_bubble_; 131 scoped_ptr<ValidationMessageBubbleAndroid> validation_message_bubble_;
130 }; 132 };
131 133
132 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); 134 bool RegisterWebContentsDelegateAndroid(JNIEnv* env);
133 135
134 } // namespace web_contents_delegate_android 136 } // namespace web_contents_delegate_android
135 137
136 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI D_H_ 138 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI D_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698