OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/extensions/app_notify_channel_ui_impl.h" | 5 #include "chrome/browser/extensions/app_notify_channel_ui_impl.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/infobars/infobar_tab_helper.h" | 8 #include "chrome/browser/infobars/infobar_tab_helper.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/signin/signin_manager.h" | 10 #include "chrome/browser/signin/signin_manager.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
22 #include "content/public/browser/notification_details.h" | 22 #include "content/public/browser/notification_details.h" |
23 #include "content/public/browser/notification_observer.h" | 23 #include "content/public/browser/notification_observer.h" |
24 #include "content/public/browser/notification_registrar.h" | 24 #include "content/public/browser/notification_registrar.h" |
25 #include "content/public/browser/notification_source.h" | 25 #include "content/public/browser/notification_source.h" |
26 #include "content/public/browser/notification_service.h" | 26 #include "content/public/browser/notification_service.h" |
27 #include "content/public/browser/notification_types.h" | 27 #include "content/public/browser/notification_types.h" |
28 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
30 | 30 |
| 31 namespace extensions { |
| 32 |
31 class AppNotifyChannelUIImpl::InfoBar : public ConfirmInfoBarDelegate { | 33 class AppNotifyChannelUIImpl::InfoBar : public ConfirmInfoBarDelegate { |
32 public: | 34 public: |
33 InfoBar(AppNotifyChannelUIImpl* creator, | 35 InfoBar(AppNotifyChannelUIImpl* creator, |
34 InfoBarTabHelper* helper, | 36 InfoBarTabHelper* helper, |
35 const std::string& app_name); | 37 const std::string& app_name); |
36 virtual ~InfoBar(); | 38 virtual ~InfoBar(); |
37 | 39 |
38 // ConfirmInfoBarDelegate. | 40 // ConfirmInfoBarDelegate. |
39 virtual string16 GetMessageText() const OVERRIDE; | 41 virtual string16 GetMessageText() const OVERRIDE; |
40 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 42 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 200 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
199 profile_)->AddObserver(this); | 201 profile_)->AddObserver(this); |
200 } | 202 } |
201 | 203 |
202 void AppNotifyChannelUIImpl::StopObservingSync() { | 204 void AppNotifyChannelUIImpl::StopObservingSync() { |
203 CHECK(observing_sync_); | 205 CHECK(observing_sync_); |
204 observing_sync_ = false; | 206 observing_sync_ = false; |
205 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | 207 ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
206 profile_)->RemoveObserver(this); | 208 profile_)->RemoveObserver(this); |
207 } | 209 } |
| 210 |
| 211 } // namespace extensions |
OLD | NEW |