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

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

Issue 14139013: Hide location bar on Javascript-initiated scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge ShowTopControls into UpdateTopControlsState, use new TopControlsState enum in plumbing, gener… Created 7 years, 7 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_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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const base::string16& message, 79 const base::string16& message,
80 int32 line_no, 80 int32 line_no,
81 const base::string16& source_id) OVERRIDE; 81 const base::string16& source_id) OVERRIDE;
82 virtual void UpdateTargetURL(content::WebContents* source, 82 virtual void UpdateTargetURL(content::WebContents* source,
83 int32 page_id, 83 int32 page_id,
84 const GURL& url) OVERRIDE; 84 const GURL& url) OVERRIDE;
85 virtual void HandleKeyboardEvent( 85 virtual void HandleKeyboardEvent(
86 content::WebContents* source, 86 content::WebContents* source,
87 const content::NativeWebKeyboardEvent& event) OVERRIDE; 87 const content::NativeWebKeyboardEvent& event) OVERRIDE;
88 virtual bool TakeFocus(content::WebContents* source, bool reverse) OVERRIDE; 88 virtual bool TakeFocus(content::WebContents* source, bool reverse) OVERRIDE;
89
90 virtual void ShowRepostFormWarningDialog( 89 virtual void ShowRepostFormWarningDialog(
91 content::WebContents* source) OVERRIDE; 90 content::WebContents* source) OVERRIDE;
92
93 virtual void ToggleFullscreenModeForTab(content::WebContents* web_contents, 91 virtual void ToggleFullscreenModeForTab(content::WebContents* web_contents,
94 bool enter_fullscreen) OVERRIDE; 92 bool enter_fullscreen) OVERRIDE;
95 virtual bool IsFullscreenForTabOrPending( 93 virtual bool IsFullscreenForTabOrPending(
96 const content::WebContents* web_contents) const OVERRIDE; 94 const content::WebContents* web_contents) const OVERRIDE;
95 virtual void DidProgrammaticallyScroll(
96 content::WebContents* web_contents,
97 const gfx::Point& scroll_point) OVERRIDE;
97 98
98 protected: 99 protected:
99 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const; 100 base::android::ScopedJavaLocalRef<jobject> GetJavaDelegate(JNIEnv* env) const;
100 101
101 private: 102 private:
102 // We depend on the java side user of WebContentDelegateAndroid to hold a 103 // We depend on the java side user of WebContentDelegateAndroid to hold a
103 // strong reference to that object as long as they want to receive callbacks 104 // strong reference to that object as long as they want to receive callbacks
104 // on it. Using a weak ref here allows it to be correctly GCed. 105 // on it. Using a weak ref here allows it to be correctly GCed.
105 JavaObjectWeakGlobalRef weak_java_delegate_; 106 JavaObjectWeakGlobalRef weak_java_delegate_;
106 }; 107 };
107 108
108 bool RegisterWebContentsDelegateAndroid(JNIEnv* env); 109 bool RegisterWebContentsDelegateAndroid(JNIEnv* env);
109 110
110 } // namespace components 111 } // namespace components
111 112
112 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI D_H_ 113 #endif // COMPONENTS_WEB_CONTENTS_DELEGATE_ANDROID_WEB_CONTENTS_DELEGATE_ANDROI D_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698