OLD | NEW |
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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 removeSnapshotDatabase(); | 689 removeSnapshotDatabase(); |
690 if (mToolbarManager != null) { | 690 if (mToolbarManager != null) { |
691 String simpleName = getClass().getSimpleName(); | 691 String simpleName = getClass().getSimpleName(); |
692 RecordHistogram.recordTimesHistogram("MobileStartup.ToolbarInflation
Time." + simpleName, | 692 RecordHistogram.recordTimesHistogram("MobileStartup.ToolbarInflation
Time." + simpleName, |
693 mInflateInitialLayoutDurationMs, TimeUnit.MILLISECONDS); | 693 mInflateInitialLayoutDurationMs, TimeUnit.MILLISECONDS); |
694 mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleNa
me); | 694 mToolbarManager.onDeferredStartup(getOnCreateTimestampMs(), simpleNa
me); |
695 } | 695 } |
696 recordKeyboardLocaleUma(); | 696 recordKeyboardLocaleUma(); |
697 | 697 |
698 // TODO(treib): Remove this when we have the proper morning reads fetchi
ng logic in place | 698 // TODO(treib): Remove this when we have the proper morning reads fetchi
ng logic in place |
699 if (CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_NTP_SNIPPE
TS)) { | 699 if (ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SNIPPETS)) { |
700 // Initialize snippets | 700 // Initialize snippets |
701 SnippetsController.get(this).fetchSnippets(false); | 701 SnippetsController.get(this).fetchSnippets(false); |
702 } | 702 } |
703 } | 703 } |
704 | 704 |
705 @Override | 705 @Override |
706 public void onStart() { | 706 public void onStart() { |
707 super.onStart(); | 707 super.onStart(); |
708 if (mContextReporter != null) mContextReporter.enable(); | 708 if (mContextReporter != null) mContextReporter.enable(); |
709 | 709 |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 public static int getThemeId() { | 1623 public static int getThemeId() { |
1624 boolean useLowEndTheme = | 1624 boolean useLowEndTheme = |
1625 SysUtils.isLowEndDevice() && Build.VERSION.SDK_INT >= Build.VERS
ION_CODES.LOLLIPOP; | 1625 SysUtils.isLowEndDevice() && Build.VERSION.SDK_INT >= Build.VERS
ION_CODES.LOLLIPOP; |
1626 return (useLowEndTheme ? R.style.MainTheme_LowEnd : R.style.MainTheme); | 1626 return (useLowEndTheme ? R.style.MainTheme_LowEnd : R.style.MainTheme); |
1627 } | 1627 } |
1628 | 1628 |
1629 private void setLowEndTheme() { | 1629 private void setLowEndTheme() { |
1630 if (getThemeId() == R.style.MainTheme_LowEnd) setTheme(R.style.MainTheme
_LowEnd); | 1630 if (getThemeId() == R.style.MainTheme_LowEnd) setTheme(R.style.MainTheme
_LowEnd); |
1631 } | 1631 } |
1632 } | 1632 } |
OLD | NEW |