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

Side by Side Diff: content/browser/android/content_view_core_impl.h

Issue 65273002: Add a mechanism to pause and resume geolocation requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new test case, fix a bug :) Created 7 years 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; 56 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE;
57 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE; 57 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) OVERRIDE;
58 virtual void ShowPastePopup(int x, int y) OVERRIDE; 58 virtual void ShowPastePopup(int x, int y) OVERRIDE;
59 virtual unsigned int GetScaledContentTexture( 59 virtual unsigned int GetScaledContentTexture(
60 float scale, 60 float scale,
61 gfx::Size* out_size) OVERRIDE; 61 gfx::Size* out_size) OVERRIDE;
62 virtual float GetDpiScale() const OVERRIDE; 62 virtual float GetDpiScale() const OVERRIDE;
63 virtual void RequestContentClipping(const gfx::Rect& clipping, 63 virtual void RequestContentClipping(const gfx::Rect& clipping,
64 const gfx::Size& content_size) OVERRIDE; 64 const gfx::Size& content_size) OVERRIDE;
65 virtual void PauseVideo() OVERRIDE; 65 virtual void PauseVideo() OVERRIDE;
66 virtual void PauseOrResumeGeolocation(bool should_pause) OVERRIDE;
66 67
67 // -------------------------------------------------------------------------- 68 // --------------------------------------------------------------------------
68 // Methods called from Java via JNI 69 // Methods called from Java via JNI
69 // -------------------------------------------------------------------------- 70 // --------------------------------------------------------------------------
70 71
71 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); 72 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj);
72 73
73 // Notifies the ContentViewCore that items were selected in the currently 74 // Notifies the ContentViewCore that items were selected in the currently
74 // showing select popup. 75 // showing select popup.
75 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices); 76 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 jobject jsurface); 223 jobject jsurface);
223 void DetachExternalVideoSurface(JNIEnv* env, jobject obj, jint player_id); 224 void DetachExternalVideoSurface(JNIEnv* env, jobject obj, jint player_id);
224 void SetAccessibilityEnabled(JNIEnv* env, jobject obj, bool enabled); 225 void SetAccessibilityEnabled(JNIEnv* env, jobject obj, bool enabled);
225 void SendActionAfterDoubleTapUma(JNIEnv* env, 226 void SendActionAfterDoubleTapUma(JNIEnv* env,
226 jobject obj, 227 jobject obj,
227 jint type, 228 jint type,
228 jboolean has_delay, 229 jboolean has_delay,
229 jint count); 230 jint count);
230 void SendSingleTapUma(JNIEnv* env, jobject obj, jint type, jint count); 231 void SendSingleTapUma(JNIEnv* env, jobject obj, jint type, jint count);
231 232
233 bool IsGeolocationActiveForTesting(JNIEnv* env, jobject obj);
234
232 // -------------------------------------------------------------------------- 235 // --------------------------------------------------------------------------
233 // Public methods that call to Java via JNI 236 // Public methods that call to Java via JNI
234 // -------------------------------------------------------------------------- 237 // --------------------------------------------------------------------------
235 238
236 // Creates a popup menu with |items|. 239 // Creates a popup menu with |items|.
237 // |multiple| defines if it should support multi-select. 240 // |multiple| defines if it should support multi-select.
238 // If not |multiple|, |selected_item| sets the initially selected item. 241 // If not |multiple|, |selected_item| sets the initially selected item.
239 // Otherwise, item's "checked" flag selects it. 242 // Otherwise, item's "checked" flag selects it.
240 void ShowSelectPopupMenu(const std::vector<MenuItem>& items, 243 void ShowSelectPopupMenu(const std::vector<MenuItem>& items,
241 int selected_item, 244 int selected_item,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // like AutofillPopup. 379 // like AutofillPopup.
377 ui::ViewAndroid* view_android_; 380 ui::ViewAndroid* view_android_;
378 381
379 // The owning window that has a hold of main application activity. 382 // The owning window that has a hold of main application activity.
380 ui::WindowAndroid* window_android_; 383 ui::WindowAndroid* window_android_;
381 384
382 // The cache of device's current orientation set from Java side, this value 385 // The cache of device's current orientation set from Java side, this value
383 // will be sent to Renderer once it is ready. 386 // will be sent to Renderer once it is ready.
384 int device_orientation_; 387 int device_orientation_;
385 388
389 bool geolocation_needs_pause_;
390
386 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 391 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
387 }; 392 };
388 393
389 bool RegisterContentViewCore(JNIEnv* env); 394 bool RegisterContentViewCore(JNIEnv* env);
390 395
391 } // namespace content 396 } // namespace content
392 397
393 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 398 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698