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

Side by Side Diff: chrome/browser/background/background_contents_service.cc

Issue 231723006: Remove balloon notification code. The last user was the Linux GTK port but that's deleted now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync after elliot's r263101 Created 6 years, 8 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 | Annotate | Revision Log
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/background/background_contents_service.h" 5 #include "chrome/browser/background/background_contents_service.h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 namespace { 66 namespace {
67 67
68 const char kNotificationPrefix[] = "app.background.crashed."; 68 const char kNotificationPrefix[] = "app.background.crashed.";
69 69
70 void CloseBalloon(const std::string& balloon_id) { 70 void CloseBalloon(const std::string& balloon_id) {
71 NotificationUIManager* notification_ui_manager = 71 NotificationUIManager* notification_ui_manager =
72 g_browser_process->notification_ui_manager(); 72 g_browser_process->notification_ui_manager();
73 bool cancelled ALLOW_UNUSED = notification_ui_manager->CancelById(balloon_id); 73 bool cancelled ALLOW_UNUSED = notification_ui_manager->CancelById(balloon_id);
74 #if defined(ENABLE_NOTIFICATIONS) 74 #if defined(ENABLE_NOTIFICATIONS)
75 if (cancelled && message_center::IsRichNotificationEnabled()) { 75 if (cancelled) {
76 // TODO(dewittj): Add this functionality to the notification UI manager's 76 // TODO(dewittj): Add this functionality to the notification UI manager's
77 // API. 77 // API.
78 g_browser_process->message_center()->SetVisibility( 78 g_browser_process->message_center()->SetVisibility(
79 message_center::VISIBILITY_TRANSIENT); 79 message_center::VISIBILITY_TRANSIENT);
80 } 80 }
81 #endif 81 #endif
82 } 82 }
83 83
84 // Closes the crash notification balloon for the app/extension with this id. 84 // Closes the crash notification balloon for the app/extension with this id.
85 void ScheduleCloseBalloon(const std::string& extension_id) { 85 void ScheduleCloseBalloon(const std::string& extension_id) {
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 bool user_gesture, 786 bool user_gesture,
787 bool* was_blocked) { 787 bool* was_blocked) {
788 Browser* browser = chrome::FindLastActiveWithProfile( 788 Browser* browser = chrome::FindLastActiveWithProfile(
789 Profile::FromBrowserContext(new_contents->GetBrowserContext()), 789 Profile::FromBrowserContext(new_contents->GetBrowserContext()),
790 chrome::GetActiveDesktop()); 790 chrome::GetActiveDesktop());
791 if (browser) { 791 if (browser) {
792 chrome::AddWebContents(browser, NULL, new_contents, disposition, 792 chrome::AddWebContents(browser, NULL, new_contents, disposition,
793 initial_pos, user_gesture, was_blocked); 793 initial_pos, user_gesture, was_blocked);
794 } 794 }
795 } 795 }
OLDNEW
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | chrome/browser/background/background_contents_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698