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.bookmarks; | 5 package org.chromium.chrome.browser.bookmarks; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.view.View; | 8 import android.view.View; |
9 | 9 |
10 import org.chromium.chrome.R; | 10 import org.chromium.chrome.R; |
(...skipping 11 matching lines...) Expand all Loading... |
22 /** | 22 /** |
23 * Create a new instance of the bookmarks page. | 23 * Create a new instance of the bookmarks page. |
24 * @param activity The activity to get context and manage fragments. | 24 * @param activity The activity to get context and manage fragments. |
25 * @param tab The tab to load urls. | 25 * @param tab The tab to load urls. |
26 */ | 26 */ |
27 public BookmarkPage(Activity activity, Tab tab) { | 27 public BookmarkPage(Activity activity, Tab tab) { |
28 super(activity, tab); | 28 super(activity, tab); |
29 } | 29 } |
30 | 30 |
31 @Override | 31 @Override |
32 protected void initialize(Activity activity) { | 32 protected void initialize(Activity activity, Tab tab) { |
33 mManager = new BookmarkManager(activity, false); | 33 mManager = new BookmarkManager(activity, false); |
34 mManager.setBasicNativePage(this); | 34 mManager.setBasicNativePage(this); |
35 mTitle = activity.getString(R.string.bookmarks); | 35 mTitle = activity.getString(R.string.bookmarks); |
36 } | 36 } |
37 | 37 |
38 @Override | 38 @Override |
39 public View getView() { | 39 public View getView() { |
40 return mManager.getView(); | 40 return mManager.getView(); |
41 } | 41 } |
42 | 42 |
(...skipping 13 matching lines...) Expand all Loading... |
56 mManager.updateForUrl(url); | 56 mManager.updateForUrl(url); |
57 } | 57 } |
58 | 58 |
59 @Override | 59 @Override |
60 public void destroy() { | 60 public void destroy() { |
61 mManager.destroy(); | 61 mManager.destroy(); |
62 mManager = null; | 62 mManager = null; |
63 super.destroy(); | 63 super.destroy(); |
64 } | 64 } |
65 } | 65 } |
OLD | NEW |