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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_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_SAFE_BROWSING_SAFE_BROWSING_TAB_OBSERVER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_TAB_OBSERVER_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/prefs/pref_change_registrar.h"
11 #include "content/public/browser/notification_observer.h"
12
13 class TabContentsWrapper;
14
15 namespace safe_browsing {
16
17 class ClientSideDetectionHost;
18
19 // Per-tab class to handle safe-browsing functionality.
20 class SafeBrowsingTabObserver : public content::NotificationObserver {
21 public:
22 explicit SafeBrowsingTabObserver(TabContentsWrapper* wrapper);
23 virtual ~SafeBrowsingTabObserver();
24
25 private:
26 // content::NotificationObserver overrides:
27 virtual void Observe(int type,
28 const content::NotificationSource& source,
29 const content::NotificationDetails& details) OVERRIDE;
30
31 // Internal helpers ----------------------------------------------------------
32
33 // Create or destroy SafebrowsingDetectionHost as needed if the user's
34 // safe browsing preference has changed.
35 void UpdateSafebrowsingDetectionHost();
36
37 // Handles IPCs.
38 scoped_ptr<ClientSideDetectionHost> safebrowsing_detection_host_;
39
40 // Our owning TabContentsWrapper.
41 TabContentsWrapper* wrapper_;
42
43 PrefChangeRegistrar pref_change_registrar_;
44
45 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingTabObserver);
46 };
47
48 } // namespace safe_browsing
49
50 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_TAB_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698