OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_MOCK_SETTINGS_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_MOCK_SETTINGS_OBSERVER_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_MOCK_SETTINGS_OBSERVER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_MOCK_SETTINGS_OBSERVER_H_ |
7 | 7 |
8 #include "chrome/common/content_settings_types.h" | 8 #include "components/content_settings/core/common/content_settings_types.h" |
9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 | 12 |
13 class ContentSettingsPattern; | 13 class ContentSettingsPattern; |
14 class HostContentSettingsMap; | 14 class HostContentSettingsMap; |
15 | 15 |
16 class MockSettingsObserver : public content::NotificationObserver { | 16 class MockSettingsObserver : public content::NotificationObserver { |
17 public: | 17 public: |
18 MockSettingsObserver(); | 18 MockSettingsObserver(); |
19 virtual ~MockSettingsObserver(); | 19 virtual ~MockSettingsObserver(); |
20 | 20 |
21 virtual void Observe(int type, | 21 virtual void Observe(int type, |
22 const content::NotificationSource& source, | 22 const content::NotificationSource& source, |
23 const content::NotificationDetails& details); | 23 const content::NotificationDetails& details); |
24 | 24 |
25 MOCK_METHOD6(OnContentSettingsChanged, | 25 MOCK_METHOD6(OnContentSettingsChanged, |
26 void(HostContentSettingsMap*, | 26 void(HostContentSettingsMap*, |
27 ContentSettingsType, | 27 ContentSettingsType, |
28 bool, | 28 bool, |
29 const ContentSettingsPattern&, | 29 const ContentSettingsPattern&, |
30 const ContentSettingsPattern&, | 30 const ContentSettingsPattern&, |
31 bool)); | 31 bool)); |
32 | 32 |
33 private: | 33 private: |
34 content::NotificationRegistrar registrar_; | 34 content::NotificationRegistrar registrar_; |
35 }; | 35 }; |
36 | 36 |
37 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_SETTINGS_OBSERVER_H_ | 37 #endif // CHROME_BROWSER_CONTENT_SETTINGS_MOCK_SETTINGS_OBSERVER_H_ |
OLD | NEW |