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

Side by Side Diff: chrome/browser/ui/alternate_error_tab_observer.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_ALTERNATE_ERROR_TAB_OBSERVER_H_
6 #define CHROME_BROWSER_UI_ALTERNATE_ERROR_TAB_OBSERVER_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 #include "content/public/browser/notification_registrar.h"
12
13 class TabContentsWrapper;
14
15 // Per-tab class to handle functionality that is core to the operation of tabs.
Jói 2011/12/09 12:36:47 I think this is copy-pasted from the original chan
Avi (use Gerrit) 2011/12/09 16:12:11 Indeed.
16 class AlternateErrorPageTabObserver : public TabContentsObserver,
17 public content::NotificationObserver {
18 public:
19 explicit AlternateErrorPageTabObserver(TabContentsWrapper* wrapper);
20 virtual ~AlternateErrorPageTabObserver();
21
22 static void RegisterUserPrefs(PrefService* prefs);
23
24 private:
25 // TabContentsObserver overrides:
26 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
27
28 // content::NotificationObserver overrides:
29 virtual void Observe(int type,
30 const content::NotificationSource& source,
31 const content::NotificationDetails& details) OVERRIDE;
32
33 // Internal helpers ----------------------------------------------------------
34
35 // Returns the server that can provide alternate error pages. If the returned
36 // URL is empty, the default error page built into WebKit will be used.
37 GURL GetAlternateErrorPageURL() const;
38
39 // Send the alternate error page URL to the renderer.
40 void UpdateAlternateErrorPageURL(RenderViewHost* rvh);
41
42 // Our owning TabContentsWrapper.
43 TabContentsWrapper* wrapper_;
44
45 content::NotificationRegistrar registrar_;
46 PrefChangeRegistrar pref_change_registrar_;
47
48 DISALLOW_COPY_AND_ASSIGN(AlternateErrorPageTabObserver);
49 };
50
51 #endif // CHROME_BROWSER_UI_ALTERNATE_ERROR_TAB_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_tab_observer.cc ('k') | chrome/browser/ui/alternate_error_tab_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698