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

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

Issue 8865004: Create CoreTabHelper, move remaining core TCW functionality into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lots of helpers now Created 9 years 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_CORE_TAB_HELPER_H_
6 #define CHROME_BROWSER_UI_TAB_CONTENTS_CORE_TAB_HELPER_H_
7 #pragma once
8
9 #include "chrome/browser/prefs/pref_change_registrar.h"
10 #include "content/browser/tab_contents/tab_contents_observer.h"
11
12 class CoreTabHelperDelegate;
13 class TabContentsWrapper;
14
15 // Per-tab class to handle functionality that is core to the operation of tabs.
16 class CoreTabHelper : public TabContentsObserver,
17 public content::NotificationObserver {
18 public:
19 explicit CoreTabHelper(TabContentsWrapper* wrapper);
20 virtual ~CoreTabHelper();
21
22 CoreTabHelperDelegate* delegate() const { return delegate_; }
23 void set_delegate(CoreTabHelperDelegate* d) { delegate_ = d; }
24
25 // Initial title assigned to NavigationEntries from Navigate.
26 static string16 GetDefaultTitle();
27
28 // Returns a human-readable description the tab's loading state.
29 string16 GetStatusText() const;
30
31 private:
32 // TabContentsObserver overrides:
33 virtual void DidBecomeSelected() OVERRIDE;
34
35 // content::NotificationObserver overrides:
36 virtual void Observe(int type,
37 const content::NotificationSource& source,
38 const content::NotificationDetails& details) OVERRIDE;
39
40 // Delegate for notifying our owner about stuff. Not owned by us.
41 CoreTabHelperDelegate* delegate_;
42
43 // Our owning TabContentsWrapper.
44 TabContentsWrapper* wrapper_;
45
46 PrefChangeRegistrar pref_change_registrar_;
47
48 DISALLOW_COPY_AND_ASSIGN(CoreTabHelper);
49 };
50
51 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_CORE_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698