OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.widget.selection; | 5 package org.chromium.chrome.browser.widget.selection; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.graphics.Color; | 9 import android.graphics.Color; |
10 import android.support.annotation.CallSuper; | 10 import android.support.annotation.CallSuper; |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 } | 447 } |
448 | 448 |
449 ApiCompatibilityUtils.setPaddingRelative(this, | 449 ApiCompatibilityUtils.setPaddingRelative(this, |
450 padding + paddingStartOffset, this.getPaddingTop(), | 450 padding + paddingStartOffset, this.getPaddingTop(), |
451 padding + paddingEndOffset, this.getPaddingBottom()); | 451 padding + paddingEndOffset, this.getPaddingBottom()); |
452 setContentInsetsRelative(contentInsetStart, contentInsetEnd); | 452 setContentInsetsRelative(contentInsetStart, contentInsetEnd); |
453 setContentInsetStartWithNavigation(contentInsetStartWithNavigation); | 453 setContentInsetStartWithNavigation(contentInsetStartWithNavigation); |
454 setContentInsetEndWithActions(contentInsetEndWithActions); | 454 setContentInsetEndWithActions(contentInsetEndWithActions); |
455 } | 455 } |
456 | 456 |
| 457 SelectionDelegate<E> getSelectionDelegate() { |
| 458 return mSelectionDelegate; |
| 459 } |
| 460 |
| 461 boolean isSearching() { |
| 462 return mIsSearching; |
| 463 } |
| 464 |
457 /** | 465 /** |
458 * Set up ActionBarDrawerToggle, a.k.a. hamburger button. | 466 * Set up ActionBarDrawerToggle, a.k.a. hamburger button. |
459 */ | 467 */ |
460 private void initActionBarDrawerToggle() { | 468 private void initActionBarDrawerToggle() { |
461 // Sadly, the only way to set correct toolbar button listener for Action
BarDrawerToggle | 469 // Sadly, the only way to set correct toolbar button listener for Action
BarDrawerToggle |
462 // is constructing, so we will need to construct every time we re-show t
his button. | 470 // is constructing, so we will need to construct every time we re-show t
his button. |
463 mActionBarDrawerToggle = new ActionBarDrawerToggle((Activity) getContext
(), | 471 mActionBarDrawerToggle = new ActionBarDrawerToggle((Activity) getContext
(), |
464 mDrawerLayout, this, | 472 mDrawerLayout, this, |
465 R.string.accessibility_drawer_toggle_btn_open, | 473 R.string.accessibility_drawer_toggle_btn_open, |
466 R.string.accessibility_drawer_toggle_btn_close); | 474 R.string.accessibility_drawer_toggle_btn_close); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 | 524 |
517 private void updateDisplayStyleIfNecessary() { | 525 private void updateDisplayStyleIfNecessary() { |
518 if (mUiConfig != null) onDisplayStyleChanged(mUiConfig.getCurrentDisplay
Style()); | 526 if (mUiConfig != null) onDisplayStyleChanged(mUiConfig.getCurrentDisplay
Style()); |
519 } | 527 } |
520 | 528 |
521 @VisibleForTesting | 529 @VisibleForTesting |
522 public View getSearchViewForTests() { | 530 public View getSearchViewForTests() { |
523 return mSearchView; | 531 return mSearchView; |
524 } | 532 } |
525 } | 533 } |
OLD | NEW |