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.ntp; | 5 package org.chromium.chrome.browser.ntp; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.graphics.Canvas; | 8 import android.graphics.Canvas; |
9 import android.view.LayoutInflater; | 9 import android.view.LayoutInflater; |
10 import android.view.View; | 10 import android.view.View; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 */ | 76 */ |
77 @VisibleForTesting | 77 @VisibleForTesting |
78 public boolean isLoadedForTests() { | 78 public boolean isLoadedForTests() { |
79 return mIsLoaded; | 79 return mIsLoaded; |
80 } | 80 } |
81 | 81 |
82 // NativePage overrides | 82 // NativePage overrides |
83 | 83 |
84 @Override | 84 @Override |
85 public void destroy() { | 85 public void destroy() { |
86 assert getView().getParent() == null : "Destroy called before removed fr
om window"; | 86 assert !getView().isAttachedToWindow() : "Destroy called before removed
from window"; |
87 } | 87 } |
88 | 88 |
89 @Override | 89 @Override |
90 public String getUrl() { | 90 public String getUrl() { |
91 return UrlConstants.NTP_URL; | 91 return UrlConstants.NTP_URL; |
92 } | 92 } |
93 | 93 |
94 @Override | 94 @Override |
95 public String getTitle() { | 95 public String getTitle() { |
96 return mTitle; | 96 return mTitle; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 @Override | 130 @Override |
131 public boolean shouldCaptureThumbnail() { | 131 public boolean shouldCaptureThumbnail() { |
132 return mIncognitoNewTabPageView.shouldCaptureThumbnail(); | 132 return mIncognitoNewTabPageView.shouldCaptureThumbnail(); |
133 } | 133 } |
134 | 134 |
135 @Override | 135 @Override |
136 public void captureThumbnail(Canvas canvas) { | 136 public void captureThumbnail(Canvas canvas) { |
137 mIncognitoNewTabPageView.captureThumbnail(canvas); | 137 mIncognitoNewTabPageView.captureThumbnail(canvas); |
138 } | 138 } |
139 } | 139 } |
OLD | NEW |