OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_tab_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "chrome/browser/android/offline_pages/offline_page_request_job.h" | 10 #include "chrome/browser/android/offline_pages/offline_page_request_job.h" |
11 #include "chrome/browser/android/offline_pages/offline_page_utils.h" | 11 #include "chrome/browser/android/offline_pages/offline_page_utils.h" |
12 #include "components/offline_pages/offline_page_item.h" | 12 #include "components/offline_pages/core/offline_page_item.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "content/public/browser/navigation_controller.h" | 14 #include "content/public/browser/navigation_controller.h" |
15 #include "content/public/browser/navigation_entry.h" | 15 #include "content/public/browser/navigation_entry.h" |
16 #include "content/public/browser/navigation_handle.h" | 16 #include "content/public/browser/navigation_handle.h" |
17 #include "content/public/browser/render_frame_host.h" | 17 #include "content/public/browser/render_frame_host.h" |
18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
19 #include "ui/base/page_transition_types.h" | 19 #include "ui/base/page_transition_types.h" |
20 | 20 |
21 DEFINE_WEB_CONTENTS_USER_DATA_KEY(offline_pages::OfflinePageTabHelper); | 21 DEFINE_WEB_CONTENTS_USER_DATA_KEY(offline_pages::OfflinePageTabHelper); |
22 | 22 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 | 179 |
180 bool OfflinePageTabHelper::IsShowingOfflinePreview() const { | 180 bool OfflinePageTabHelper::IsShowingOfflinePreview() const { |
181 // TODO(ryansturm): Change this once offline pages infrastructure uses | 181 // TODO(ryansturm): Change this once offline pages infrastructure uses |
182 // NavigationHandle instead of a back channel. crbug.com/658899 | 182 // NavigationHandle instead of a back channel. crbug.com/658899 |
183 return provisional_offline_info_.is_showing_offline_preview || | 183 return provisional_offline_info_.is_showing_offline_preview || |
184 offline_info_.is_showing_offline_preview; | 184 offline_info_.is_showing_offline_preview; |
185 } | 185 } |
186 | 186 |
187 } // namespace offline_pages | 187 } // namespace offline_pages |
OLD | NEW |