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

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

Issue 10824265: Correctly remove file browser notifications from Ash notification tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_notifications.h » ('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/background/background_contents_service.h" 5 #include "chrome/browser/background/background_contents_service.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void ShowBalloon(const Extension* extension, Profile* profile) { 111 void ShowBalloon(const Extension* extension, Profile* profile) {
112 #if defined(ENABLE_NOTIFICATIONS) 112 #if defined(ENABLE_NOTIFICATIONS)
113 string16 title; // no notifiaction title 113 string16 title; // no notifiaction title
114 string16 message = l10n_util::GetStringFUTF16( 114 string16 message = l10n_util::GetStringFUTF16(
115 extension->is_app() ? IDS_BACKGROUND_CRASHED_APP_BALLOON_MESSAGE : 115 extension->is_app() ? IDS_BACKGROUND_CRASHED_APP_BALLOON_MESSAGE :
116 IDS_BACKGROUND_CRASHED_EXTENSION_BALLOON_MESSAGE, 116 IDS_BACKGROUND_CRASHED_EXTENSION_BALLOON_MESSAGE,
117 UTF8ToUTF16(extension->name())); 117 UTF8ToUTF16(extension->name()));
118 GURL icon_url(extension->GetIconURL(ExtensionIconSet::EXTENSION_ICON_SMALLISH, 118 GURL icon_url(extension->GetIconURL(ExtensionIconSet::EXTENSION_ICON_SMALLISH,
119 ExtensionIconSet::MATCH_BIGGER)); 119 ExtensionIconSet::MATCH_BIGGER));
120 DesktopNotificationService::AddNotification( 120 DesktopNotificationService::AddNotification(
121 extension->url(), title, message, icon_url, 121 extension->url(), title, message, icon_url, string16(),
122 new CrashNotificationDelegate(profile, extension), profile); 122 new CrashNotificationDelegate(profile, extension), profile);
123 #endif 123 #endif
124 } 124 }
125 125
126 } 126 }
127 127
128 // Keys for the information we store about individual BackgroundContents in 128 // Keys for the information we store about individual BackgroundContents in
129 // prefs. There is one top-level DictionaryValue (stored at 129 // prefs. There is one top-level DictionaryValue (stored at
130 // prefs::kRegisteredBackgroundContents). Information about each 130 // prefs::kRegisteredBackgroundContents). Information about each
131 // BackgroundContents is stored under that top-level DictionaryValue, keyed 131 // BackgroundContents is stored under that top-level DictionaryValue, keyed
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 WindowOpenDisposition disposition, 613 WindowOpenDisposition disposition,
614 const gfx::Rect& initial_pos, 614 const gfx::Rect& initial_pos,
615 bool user_gesture) { 615 bool user_gesture) {
616 Browser* browser = browser::FindLastActiveWithProfile( 616 Browser* browser = browser::FindLastActiveWithProfile(
617 Profile::FromBrowserContext(new_contents->GetBrowserContext())); 617 Profile::FromBrowserContext(new_contents->GetBrowserContext()));
618 if (browser) { 618 if (browser) {
619 chrome::AddWebContents(browser, NULL, new_contents, disposition, 619 chrome::AddWebContents(browser, NULL, new_contents, disposition,
620 initial_pos, user_gesture); 620 initial_pos, user_gesture);
621 } 621 }
622 } 622 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_notifications.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698