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