| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SYNC_SESSIONS_NOTIFICATION_SERVICE_SESSIONS_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_NOTIFICATION_SERVICE_SESSIONS_ROUTER_H_ |
| 6 #define CHROME_BROWSER_SYNC_SESSIONS_NOTIFICATION_SERVICE_SESSIONS_ROUTER_H_ | 6 #define CHROME_BROWSER_SYNC_SESSIONS_NOTIFICATION_SERVICE_SESSIONS_ROUTER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback_list.h" | 10 #include "base/callback_list.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void Stop() override; | 44 void Stop() override; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 // Called when the URL visited in |web_contents| was blocked by the | 47 // Called when the URL visited in |web_contents| was blocked by the |
| 48 // SupervisedUserService. We forward this on to our handler_ via the | 48 // SupervisedUserService. We forward this on to our handler_ via the |
| 49 // normal OnLocalTabModified, but pass through here via a WeakPtr | 49 // normal OnLocalTabModified, but pass through here via a WeakPtr |
| 50 // callback from SupervisedUserService and to extract the tab delegate | 50 // callback from SupervisedUserService and to extract the tab delegate |
| 51 // from WebContents. | 51 // from WebContents. |
| 52 void OnNavigationBlocked(content::WebContents* web_contents); | 52 void OnNavigationBlocked(content::WebContents* web_contents); |
| 53 | 53 |
| 54 // Called when the urls of favicon changed. | 54 // Called when the favicons for the given page URLs |
| 55 void OnFaviconChanged(const std::set<GURL>& changed_favicons); | 55 // (e.g. http://www.google.com) and the given icon URLs (e.g. |
| 56 // http://www.google.com/favicon.ico) have changed. |
| 57 void OnFaviconsChanged(const std::vector<GURL>& page_urls, |
| 58 const std::vector<GURL>& icon_urls); |
| 56 | 59 |
| 57 LocalSessionEventHandler* handler_; | 60 LocalSessionEventHandler* handler_; |
| 58 content::NotificationRegistrar registrar_; | 61 content::NotificationRegistrar registrar_; |
| 59 Profile* const profile_; | 62 Profile* const profile_; |
| 60 syncer::SyncableService::StartSyncFlare flare_; | 63 syncer::SyncableService::StartSyncFlare flare_; |
| 61 | 64 |
| 62 scoped_ptr<base::CallbackList<void(const std::set<GURL>&)>::Subscription> | 65 scoped_ptr<base::CallbackList<void(const std::vector<GURL>&, |
| 66 const std::vector<GURL>&)>::Subscription> |
| 63 favicon_changed_subscription_; | 67 favicon_changed_subscription_; |
| 64 | 68 |
| 65 base::WeakPtrFactory<NotificationServiceSessionsRouter> weak_ptr_factory_; | 69 base::WeakPtrFactory<NotificationServiceSessionsRouter> weak_ptr_factory_; |
| 66 | 70 |
| 67 DISALLOW_COPY_AND_ASSIGN(NotificationServiceSessionsRouter); | 71 DISALLOW_COPY_AND_ASSIGN(NotificationServiceSessionsRouter); |
| 68 }; | 72 }; |
| 69 | 73 |
| 70 } // namespace browser_sync | 74 } // namespace browser_sync |
| 71 | 75 |
| 72 #endif // CHROME_BROWSER_SYNC_SESSIONS_NOTIFICATION_SERVICE_SESSIONS_ROUTER_H_ | 76 #endif // CHROME_BROWSER_SYNC_SESSIONS_NOTIFICATION_SERVICE_SESSIONS_ROUTER_H_ |
| OLD | NEW |