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.document; | 5 package org.chromium.chrome.browser.document; |
6 | 6 |
7 import android.annotation.TargetApi; | 7 import android.annotation.TargetApi; |
8 import android.content.Intent; | 8 import android.content.Intent; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 } | 509 } |
510 mDocumentTab.initializeTabUma(creationState); | 510 mDocumentTab.initializeTabUma(creationState); |
511 | 511 |
512 ToolbarControlContainer controlContainer = | 512 ToolbarControlContainer controlContainer = |
513 (ToolbarControlContainer) findViewById(R.id.control_container); | 513 (ToolbarControlContainer) findViewById(R.id.control_container); |
514 LayoutManagerDocument layoutDriver = new LayoutManagerDocument(getCompos
itorViewHolder()); | 514 LayoutManagerDocument layoutDriver = new LayoutManagerDocument(getCompos
itorViewHolder()); |
515 initializeCompositorContent(layoutDriver, findViewById(R.id.url_bar), | 515 initializeCompositorContent(layoutDriver, findViewById(R.id.url_bar), |
516 (ViewGroup) findViewById(android.R.id.content), controlContainer
); | 516 (ViewGroup) findViewById(android.R.id.content), controlContainer
); |
517 | 517 |
518 mFindToolbarManager = new FindToolbarManager(this, getTabModelSelector()
, | 518 mFindToolbarManager = new FindToolbarManager(this, getTabModelSelector()
, |
519 getToolbarManager().getContextualMenuBar() | 519 getToolbarManager().getActionModeController() |
520 .getCustomSelectionActionModeCallback()); | 520 .getActionModeCallback()); |
521 | 521 |
522 getToolbarManager().initializeWithNative(getTabModelSelector(), getFulls
creenManager(), | 522 getToolbarManager().initializeWithNative(getTabModelSelector(), getFulls
creenManager(), |
523 mFindToolbarManager, null, layoutDriver, null, null, null, null)
; | 523 mFindToolbarManager, null, layoutDriver, null, null, null, null)
; |
524 | 524 |
525 mDocumentTab.setFullscreenManager(getFullscreenManager()); | 525 mDocumentTab.setFullscreenManager(getFullscreenManager()); |
526 | 526 |
527 mDocumentTab.addObserver(new DocumentTabObserver() { | 527 mDocumentTab.addObserver(new DocumentTabObserver() { |
528 @Override | 528 @Override |
529 public void onPageLoadStarted(Tab tab, String url) { | 529 public void onPageLoadStarted(Tab tab, String url) { |
530 // Discard startup navigation measurements when the user interfe
red and started the | 530 // Discard startup navigation measurements when the user interfe
red and started the |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 | 864 |
865 /** | 865 /** |
866 * Launch a new DocumentActivity showing the new tab page. | 866 * Launch a new DocumentActivity showing the new tab page. |
867 * @param incognito Whether the new NTP should be in incognito mode. | 867 * @param incognito Whether the new NTP should be in incognito mode. |
868 */ | 868 */ |
869 private void launchNtp(boolean incognito) { | 869 private void launchNtp(boolean incognito) { |
870 if (incognito && !PrefServiceBridge.getInstance().isIncognitoModeEnabled
()) return; | 870 if (incognito && !PrefServiceBridge.getInstance().isIncognitoModeEnabled
()) return; |
871 getTabCreator(incognito).launchNTP(); | 871 getTabCreator(incognito).launchNTP(); |
872 } | 872 } |
873 } | 873 } |
OLD | NEW |