Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: chrome/browser/ui/tab_contents/core_tab_helper.cc

Issue 10905301: Switch CoreTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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;
19
18 CoreTabHelper::CoreTabHelper(WebContents* web_contents) 20 CoreTabHelper::CoreTabHelper(WebContents* web_contents)
19 : content::WebContentsObserver(web_contents), 21 : content::WebContentsObserver(web_contents),
20 delegate_(NULL) { 22 delegate_(NULL) {
21 } 23 }
22 24
23 CoreTabHelper::~CoreTabHelper() { 25 CoreTabHelper::~CoreTabHelper() {
24 } 26 }
25 27
26 string16 CoreTabHelper::GetDefaultTitle() { 28 string16 CoreTabHelper::GetDefaultTitle() {
27 return l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE); 29 return l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return string16(); 78 return string16();
77 } 79 }
78 80
79 //////////////////////////////////////////////////////////////////////////////// 81 ////////////////////////////////////////////////////////////////////////////////
80 // WebContentsObserver overrides 82 // WebContentsObserver overrides
81 83
82 void CoreTabHelper::WasShown() { 84 void CoreTabHelper::WasShown() {
83 WebCacheManager::GetInstance()->ObserveActivity( 85 WebCacheManager::GetInstance()->ObserveActivity(
84 web_contents()->GetRenderProcessHost()->GetID()); 86 web_contents()->GetRenderProcessHost()->GetID());
85 } 87 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.h ('k') | chrome/browser/ui/tab_contents/core_tab_helper_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698