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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Issue 2836213002: RELAND: GeoLocation: add support for GmsCore location provider (Closed)
Patch Set: Mark GmsCore LocationProvider as enabled only from Chrome Created 3 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
« no previous file with comments | « no previous file | content/public/android/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.SearchManager; 10 import android.app.SearchManager;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContentControll er; 142 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContentControll er;
143 import org.chromium.chrome.browser.widget.bottomsheet.EmptyBottomSheetObserver; 143 import org.chromium.chrome.browser.widget.bottomsheet.EmptyBottomSheetObserver;
144 import org.chromium.components.bookmarks.BookmarkId; 144 import org.chromium.components.bookmarks.BookmarkId;
145 import org.chromium.content.browser.ContentVideoView; 145 import org.chromium.content.browser.ContentVideoView;
146 import org.chromium.content.browser.ContentViewCore; 146 import org.chromium.content.browser.ContentViewCore;
147 import org.chromium.content.common.ContentSwitches; 147 import org.chromium.content.common.ContentSwitches;
148 import org.chromium.content_public.browser.ContentBitmapCallback; 148 import org.chromium.content_public.browser.ContentBitmapCallback;
149 import org.chromium.content_public.browser.LoadUrlParams; 149 import org.chromium.content_public.browser.LoadUrlParams;
150 import org.chromium.content_public.browser.WebContents; 150 import org.chromium.content_public.browser.WebContents;
151 import org.chromium.content_public.browser.readback_types.ReadbackResponse; 151 import org.chromium.content_public.browser.readback_types.ReadbackResponse;
152 import org.chromium.device.geolocation.LocationProviderFactory;
152 import org.chromium.policy.CombinedPolicyProvider; 153 import org.chromium.policy.CombinedPolicyProvider;
153 import org.chromium.policy.CombinedPolicyProvider.PolicyChangeListener; 154 import org.chromium.policy.CombinedPolicyProvider.PolicyChangeListener;
154 import org.chromium.printing.PrintManagerDelegateImpl; 155 import org.chromium.printing.PrintManagerDelegateImpl;
155 import org.chromium.printing.PrintingController; 156 import org.chromium.printing.PrintingController;
156 import org.chromium.printing.PrintingControllerImpl; 157 import org.chromium.printing.PrintingControllerImpl;
157 import org.chromium.ui.base.ActivityWindowAndroid; 158 import org.chromium.ui.base.ActivityWindowAndroid;
158 import org.chromium.ui.base.DeviceFormFactor; 159 import org.chromium.ui.base.DeviceFormFactor;
159 import org.chromium.ui.base.PageTransition; 160 import org.chromium.ui.base.PageTransition;
160 import org.chromium.ui.base.WindowAndroid; 161 import org.chromium.ui.base.WindowAndroid;
161 import org.chromium.ui.widget.Toast; 162 import org.chromium.ui.widget.Toast;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 382
382 mBottomSheetContentController = 383 mBottomSheetContentController =
383 (BottomSheetContentController) ((ViewStub) findViewById(R.id .bottom_nav_stub)) 384 (BottomSheetContentController) ((ViewStub) findViewById(R.id .bottom_nav_stub))
384 .inflate(); 385 .inflate();
385 int controlContainerHeight = 386 int controlContainerHeight =
386 ((ControlContainer) findViewById(R.id.control_container)).ge tView().getHeight(); 387 ((ControlContainer) findViewById(R.id.control_container)).ge tView().getHeight();
387 mBottomSheetContentController.init( 388 mBottomSheetContentController.init(
388 mBottomSheet, controlContainerHeight, mTabModelSelector, thi s); 389 mBottomSheet, controlContainerHeight, mTabModelSelector, thi s);
389 } 390 }
390 ((BottomContainer) findViewById(R.id.bottom_container)).initialize(mFull screenManager); 391 ((BottomContainer) findViewById(R.id.bottom_container)).initialize(mFull screenManager);
392
393 LocationProviderFactory.useGmsCoreLocationProvider();
Ted C 2017/04/27 18:20:44 Not everything in Chrome goes through ChromeActivi
mcasas 2017/04/27 18:35:31 Done, thanks. I moved it to handlePreNativeIniti
391 } 394 }
392 395
393 @Override 396 @Override
394 protected View getViewToBeDrawnBeforeInitializingNative() { 397 protected View getViewToBeDrawnBeforeInitializingNative() {
395 View controlContainer = findViewById(R.id.control_container); 398 View controlContainer = findViewById(R.id.control_container);
396 return controlContainer != null ? controlContainer 399 return controlContainer != null ? controlContainer
397 : super.getViewToBeDrawnBeforeInitializingNative(); 400 : super.getViewToBeDrawnBeforeInitializingNative();
398 } 401 }
399 402
400 /** 403 /**
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 * draw over VR contents should be hidden in this call. 2157 * draw over VR contents should be hidden in this call.
2155 */ 2158 */
2156 public void onEnterVr() {} 2159 public void onEnterVr() {}
2157 2160
2158 /** 2161 /**
2159 * Called when VR mode using this activity is exited. Any state set for VR s hould be restored 2162 * Called when VR mode using this activity is exited. Any state set for VR s hould be restored
2160 * in this call, including showing 2D UI that was hidden. 2163 * in this call, including showing 2D UI that was hidden.
2161 */ 2164 */
2162 public void onExitVr() {} 2165 public void onExitVr() {}
2163 } 2166 }
OLDNEW
« no previous file with comments | « no previous file | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698