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