| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/tab_contents/core_tab_helper.h" | 5 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/renderer_host/web_cache_manager.h" | 7 #include "chrome/browser/renderer_host/web_cache_manager.h" |
| 8 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 8 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 9 #include "content/public/browser/render_process_host.h" | 9 #include "content/public/browser/render_process_host.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| 11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 12 #include "net/base/load_states.h" | 12 #include "net/base/load_states.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
| 15 | 15 |
| 16 using content::WebContents; | 16 using content::WebContents; |
| 17 | 17 |
| 18 int CoreTabHelper::kUserDataKey; | 18 DEFINE_WEB_CONTENTS_USER_DATA_KEY(CoreTabHelper) |
| 19 | 19 |
| 20 CoreTabHelper::CoreTabHelper(WebContents* web_contents) | 20 CoreTabHelper::CoreTabHelper(WebContents* web_contents) |
| 21 : content::WebContentsObserver(web_contents), | 21 : content::WebContentsObserver(web_contents), |
| 22 delegate_(NULL) { | 22 delegate_(NULL) { |
| 23 } | 23 } |
| 24 | 24 |
| 25 CoreTabHelper::~CoreTabHelper() { | 25 CoreTabHelper::~CoreTabHelper() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 string16 CoreTabHelper::GetDefaultTitle() { | 28 string16 CoreTabHelper::GetDefaultTitle() { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 return string16(); | 78 return string16(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 //////////////////////////////////////////////////////////////////////////////// | 81 //////////////////////////////////////////////////////////////////////////////// |
| 82 // WebContentsObserver overrides | 82 // WebContentsObserver overrides |
| 83 | 83 |
| 84 void CoreTabHelper::WasShown() { | 84 void CoreTabHelper::WasShown() { |
| 85 WebCacheManager::GetInstance()->ObserveActivity( | 85 WebCacheManager::GetInstance()->ObserveActivity( |
| 86 web_contents()->GetRenderProcessHost()->GetID()); | 86 web_contents()->GetRenderProcessHost()->GetID()); |
| 87 } | 87 } |
| OLD | NEW |