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.history; | 5 package org.chromium.chrome.browser.history; |
6 | 6 |
7 import android.support.v7.widget.Toolbar; | 7 import android.support.v7.widget.Toolbar; |
8 import android.view.View; | 8 import android.view.View; |
9 | 9 |
10 import org.chromium.chrome.browser.ChromeActivity; | 10 import org.chromium.chrome.browser.ChromeActivity; |
11 import org.chromium.chrome.browser.toolbar.BottomToolbarPhone; | 11 import org.chromium.chrome.browser.toolbar.BottomToolbarPhone; |
12 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.BottomSheetCon
tent; | 12 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.BottomSheetCon
tent; |
| 13 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContentControll
er; |
13 | 14 |
14 /** | 15 /** |
15 * A {@link BottomSheetContent} holding a {@link HistoryManager} for display in
the BottomSheet. | 16 * A {@link BottomSheetContent} holding a {@link HistoryManager} for display in
the BottomSheet. |
16 */ | 17 */ |
17 public class HistorySheetContent implements BottomSheetContent { | 18 public class HistorySheetContent implements BottomSheetContent { |
18 private final View mContentView; | 19 private final View mContentView; |
19 private final Toolbar mToolbarView; | 20 private final Toolbar mToolbarView; |
20 private HistoryManager mHistoryManager; | 21 private HistoryManager mHistoryManager; |
21 | 22 |
22 /** | 23 /** |
(...skipping 20 matching lines...) Expand all Loading... |
43 @Override | 44 @Override |
44 public int getVerticalScrollOffset() { | 45 public int getVerticalScrollOffset() { |
45 return mHistoryManager.getVerticalScrollOffset(); | 46 return mHistoryManager.getVerticalScrollOffset(); |
46 } | 47 } |
47 | 48 |
48 @Override | 49 @Override |
49 public void destroy() { | 50 public void destroy() { |
50 mHistoryManager.onDestroyed(); | 51 mHistoryManager.onDestroyed(); |
51 mHistoryManager = null; | 52 mHistoryManager = null; |
52 } | 53 } |
| 54 |
| 55 @Override |
| 56 public int getType() { |
| 57 return BottomSheetContentController.TYPE_HISTORY; |
| 58 } |
53 } | 59 } |
OLD | NEW |