Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/notifications/message_center_notification_manager.cc

Issue 514293003: Run athena on chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments, rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/idle_chromeos.cc ('k') | chrome/browser/ui/ash/ash_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/notifications/message_center_notification_manager.h" 5 #include "chrome/browser/notifications/message_center_notification_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 stats_collector_(message_center), 69 stats_collector_(message_center),
70 google_now_stats_collector_(message_center) { 70 google_now_stats_collector_(message_center) {
71 #if defined(OS_WIN) 71 #if defined(OS_WIN)
72 first_run_pref_.Init(prefs::kMessageCenterShowedFirstRunBalloon, local_state); 72 first_run_pref_.Init(prefs::kMessageCenterShowedFirstRunBalloon, local_state);
73 #endif 73 #endif
74 74
75 message_center_->AddObserver(this); 75 message_center_->AddObserver(this);
76 message_center_->SetNotifierSettingsProvider(settings_provider_.get()); 76 message_center_->SetNotifierSettingsProvider(settings_provider_.get());
77 77
78 #if defined(OS_CHROMEOS) 78 #if defined(OS_CHROMEOS)
79 #if !defined(USE_ATHENA)
80 // TODO(oshima|hashimoto): Support notification on athena. crbug.com/408755.
79 blockers_.push_back( 81 blockers_.push_back(
80 new LoginStateNotificationBlockerChromeOS(message_center)); 82 new LoginStateNotificationBlockerChromeOS(message_center));
83 #endif
81 #else 84 #else
82 blockers_.push_back(new ScreenLockNotificationBlocker(message_center)); 85 blockers_.push_back(new ScreenLockNotificationBlocker(message_center));
83 #endif 86 #endif
84 blockers_.push_back(new FullscreenNotificationBlocker(message_center)); 87 blockers_.push_back(new FullscreenNotificationBlocker(message_center));
85 88
86 #if defined(OS_WIN) || defined(OS_MACOSX) \ 89 #if defined(OS_WIN) || defined(OS_MACOSX) \
87 || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) 90 || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
88 // On Windows, Linux and Mac, the notification manager owns the tray icon and 91 // On Windows, Linux and Mac, the notification manager owns the tray icon and
89 // views.Other platforms have global ownership and Create will return NULL. 92 // views.Other platforms have global ownership and Create will return NULL.
90 tray_.reset(message_center::CreateMessageCenterTray()); 93 tray_.reset(message_center::CreateMessageCenterTray());
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 it != registry->enabled_extensions().end(); 563 it != registry->enabled_extensions().end();
561 ++it) { 564 ++it) {
562 if ((*it->get()).permissions_data()->HasAPIPermission( 565 if ((*it->get()).permissions_data()->HasAPIPermission(
563 extensions::APIPermission::ID::kNotificationProvider)) { 566 extensions::APIPermission::ID::kNotificationProvider)) {
564 extension_id = (*it->get()).id(); 567 extension_id = (*it->get()).id();
565 return extension_id; 568 return extension_id;
566 } 569 }
567 } 570 }
568 return extension_id; 571 return extension_id;
569 } 572 }
OLDNEW
« no previous file with comments | « chrome/browser/idle_chromeos.cc ('k') | chrome/browser/ui/ash/ash_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698