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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 } | 510 } |
511 mDocumentTab.initializeTabUma(creationState); | 511 mDocumentTab.initializeTabUma(creationState); |
512 | 512 |
513 ToolbarControlContainer controlContainer = | 513 ToolbarControlContainer controlContainer = |
514 (ToolbarControlContainer) findViewById(R.id.control_container); | 514 (ToolbarControlContainer) findViewById(R.id.control_container); |
515 LayoutManagerDocument layoutDriver = new LayoutManagerDocument(getCompos
itorViewHolder()); | 515 LayoutManagerDocument layoutDriver = new LayoutManagerDocument(getCompos
itorViewHolder()); |
516 initializeCompositorContent(layoutDriver, findViewById(R.id.url_bar), | 516 initializeCompositorContent(layoutDriver, findViewById(R.id.url_bar), |
517 (ViewGroup) findViewById(android.R.id.content), controlContainer
); | 517 (ViewGroup) findViewById(android.R.id.content), controlContainer
); |
518 | 518 |
519 mFindToolbarManager = new FindToolbarManager(this, getTabModelSelector()
, | 519 mFindToolbarManager = new FindToolbarManager(this, getTabModelSelector()
, |
520 getToolbarManager().getContextualMenuBar() | 520 getToolbarManager().getActionModeController() |
521 .getCustomSelectionActionModeCallback()); | 521 .getActionModeCallback()); |
522 | 522 |
523 getToolbarManager().initializeWithNative(getTabModelSelector(), getFulls
creenManager(), | 523 getToolbarManager().initializeWithNative(getTabModelSelector(), getFulls
creenManager(), |
524 mFindToolbarManager, null, layoutDriver, null, null, null, null)
; | 524 mFindToolbarManager, null, layoutDriver, null, null, null, null)
; |
525 | 525 |
526 mDocumentTab.setFullscreenManager(getFullscreenManager()); | 526 mDocumentTab.setFullscreenManager(getFullscreenManager()); |
527 | 527 |
528 mDocumentTab.addObserver(new DocumentTabObserver() { | 528 mDocumentTab.addObserver(new DocumentTabObserver() { |
529 @Override | 529 @Override |
530 public void onPageLoadStarted(Tab tab, String url) { | 530 public void onPageLoadStarted(Tab tab, String url) { |
531 // Discard startup navigation measurements when the user interfe
red and started the | 531 // Discard startup navigation measurements when the user interfe
red and started the |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 | 871 |
872 /** | 872 /** |
873 * Launch a new DocumentActivity showing the new tab page. | 873 * Launch a new DocumentActivity showing the new tab page. |
874 * @param incognito Whether the new NTP should be in incognito mode. | 874 * @param incognito Whether the new NTP should be in incognito mode. |
875 */ | 875 */ |
876 private void launchNtp(boolean incognito) { | 876 private void launchNtp(boolean incognito) { |
877 if (incognito && !PrefServiceBridge.getInstance().isIncognitoModeEnabled
()) return; | 877 if (incognito && !PrefServiceBridge.getInstance().isIncognitoModeEnabled
()) return; |
878 getTabCreator(incognito).launchNTP(); | 878 getTabCreator(incognito).launchNTP(); |
879 } | 879 } |
880 } | 880 } |
OLD | NEW |