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

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

Issue 2233023002: Adding BlimpNavigationController to Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nav_handler_remove
Patch Set: Fixing unit tests Created 4 years, 3 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 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 /** 462 /**
463 * @return Whether contextual search is allowed for this activity or not. 463 * @return Whether contextual search is allowed for this activity or not.
464 */ 464 */
465 protected boolean isContextualSearchAllowed() { 465 protected boolean isContextualSearchAllowed() {
466 return true; 466 return true;
467 } 467 }
468 468
469 @Override 469 @Override
470 public void initializeState() { 470 public void initializeState() {
471 super.initializeState(); 471 super.initializeState();
472 mBlimpClientContextDelegate =
473 ChromeBlimpClientContextDelegate.createAndSetDelegateForContext(
474 Profile.getLastUsedProfile().getOriginalProfile());
475
472 IntentHandler.setTestIntentsEnabled( 476 IntentHandler.setTestIntentsEnabled(
473 CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TEST_ INTENTS)); 477 CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TEST_ INTENTS));
474 mIntentHandler = new IntentHandler(createIntentHandlerDelegate(), getPac kageName()); 478 mIntentHandler = new IntentHandler(createIntentHandlerDelegate(), getPac kageName());
475 } 479 }
476 480
477 @Override 481 @Override
478 public void initializeCompositor() { 482 public void initializeCompositor() {
479 TraceEvent.begin("ChromeActivity:CompositorInitialization"); 483 TraceEvent.begin("ChromeActivity:CompositorInitialization");
480 super.initializeCompositor(); 484 super.initializeCompositor();
481 485
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 if (Build.VERSION.CODENAME.equals("N") || Build.VERSION.SDK_INT > Build. VERSION_CODES.M) { 960 if (Build.VERSION.CODENAME.equals("N") || Build.VERSION.SDK_INT > Build. VERSION_CODES.M) {
957 getWindow().setBackgroundDrawable(new ColorDrawable( 961 getWindow().setBackgroundDrawable(new ColorDrawable(
958 ApiCompatibilityUtils.getColor(getResources(), 962 ApiCompatibilityUtils.getColor(getResources(),
959 R.color.resizing_background_color))); 963 R.color.resizing_background_color)));
960 } else { 964 } else {
961 removeWindowBackground(); 965 removeWindowBackground();
962 } 966 }
963 DownloadManagerService.getDownloadManagerService( 967 DownloadManagerService.getDownloadManagerService(
964 getApplicationContext()).onActivityLaunched(); 968 getApplicationContext()).onActivityLaunched();
965 969
966 mBlimpClientContextDelegate = ChromeBlimpClientContextDelegate
967 .createAndSetDelegateForContext(Profile.getLastUsedProfile().get OriginalProfile());
968
969 super.finishNativeInitialization(); 970 super.finishNativeInitialization();
970 } 971 }
971 972
972 /** 973 /**
973 * Called when the accessibility status of this device changes. This might be triggered by 974 * Called when the accessibility status of this device changes. This might be triggered by
974 * touch exploration or general accessibility status updates. It is an aggr egate of two other 975 * touch exploration or general accessibility status updates. It is an aggr egate of two other
975 * accessibility update methods. 976 * accessibility update methods.
976 * @see #onAccessibilityModeChanged(boolean) 977 * @see #onAccessibilityModeChanged(boolean)
977 * @see #onTouchExplorationStateChanged(boolean) 978 * @see #onTouchExplorationStateChanged(boolean)
978 * @param enabled Whether or not accessibility and touch exploration are cur rently enabled. 979 * @param enabled Whether or not accessibility and touch exploration are cur rently enabled.
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 "Android.MultiWindowMode.IsTabletScreenWidthBelow600", 1815 "Android.MultiWindowMode.IsTabletScreenWidthBelow600",
1815 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP); 1816 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP);
1816 1817
1817 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) { 1818 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) {
1818 RecordHistogram.recordLinearCountHistogram( 1819 RecordHistogram.recordLinearCountHistogram(
1819 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1, 1820 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1,
1820 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50); 1821 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50);
1821 } 1822 }
1822 } 1823 }
1823 } 1824 }
OLDNEW
« no previous file with comments | « blimp/client/public/contents/blimp_contents.h ('k') | chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698