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

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

Issue 2379253002: Remove ContentViewCore::PauseOrResumeGeolocation() (Closed)
Patch Set: comment Created 4 years, 2 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 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 #include "content/browser/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 return java_ref_.get(env); 395 return java_ref_.get(env);
396 } 396 }
397 397
398 jint ContentViewCoreImpl::GetBackgroundColor(JNIEnv* env, jobject obj) { 398 jint ContentViewCoreImpl::GetBackgroundColor(JNIEnv* env, jobject obj) {
399 RenderWidgetHostViewAndroid* rwhva = GetRenderWidgetHostViewAndroid(); 399 RenderWidgetHostViewAndroid* rwhva = GetRenderWidgetHostViewAndroid();
400 if (!rwhva) 400 if (!rwhva)
401 return SK_ColorWHITE; 401 return SK_ColorWHITE;
402 return rwhva->GetCachedBackgroundColor(); 402 return rwhva->GetCachedBackgroundColor();
403 } 403 }
404 404
405 void ContentViewCoreImpl::PauseOrResumeGeolocation(bool should_pause) {
406 if (should_pause)
407 web_contents_->GetGeolocationServiceContext()->PauseUpdates();
408 else
409 web_contents_->GetGeolocationServiceContext()->ResumeUpdates();
410 }
411
412 // All positions and sizes are in CSS pixels. 405 // All positions and sizes are in CSS pixels.
413 // Note that viewport_width/height is a best effort based. 406 // Note that viewport_width/height is a best effort based.
414 // ContentViewCore has the actual information about the physical viewport size. 407 // ContentViewCore has the actual information about the physical viewport size.
415 void ContentViewCoreImpl::UpdateFrameInfo( 408 void ContentViewCoreImpl::UpdateFrameInfo(
416 const gfx::Vector2dF& scroll_offset, 409 const gfx::Vector2dF& scroll_offset,
417 float page_scale_factor, 410 float page_scale_factor,
418 const gfx::Vector2dF& page_scale_factor_limits, 411 const gfx::Vector2dF& page_scale_factor_limits,
419 const gfx::SizeF& content_size, 412 const gfx::SizeF& content_size,
420 const gfx::SizeF& viewport_size, 413 const gfx::SizeF& viewport_size,
421 const float top_controls_height, 414 const float top_controls_height,
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 return ScopedJavaLocalRef<jobject>(); 1570 return ScopedJavaLocalRef<jobject>();
1578 1571
1579 return view->GetJavaObject(); 1572 return view->GetJavaObject();
1580 } 1573 }
1581 1574
1582 bool RegisterContentViewCore(JNIEnv* env) { 1575 bool RegisterContentViewCore(JNIEnv* env) {
1583 return RegisterNativesImpl(env); 1576 return RegisterNativesImpl(env);
1584 } 1577 }
1585 1578
1586 } // namespace content 1579 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/public/browser/android/content_view_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698