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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 10830036: Moved the AppNotification system into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 2afb4383cc79bd4a1991b9b2c199af8b67427198..c86412f2429e37b807b5a6f44f50a44034f0b9a5 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -18,6 +18,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/browser/extensions/app_notification.h"
#include "chrome/browser/extensions/app_notification_manager.h"
#include "chrome/browser/extensions/apps_promo.h"
#include "chrome/browser/extensions/crx_installer.h"
@@ -93,7 +94,7 @@ AppLauncherHandler::~AppLauncherHandler() {}
// Serializes |notification| into a new DictionaryValue which the caller then
// owns.
static DictionaryValue* SerializeNotification(
- const AppNotification& notification) {
+ const extensions::AppNotification& notification) {
DictionaryValue* dictionary = new DictionaryValue();
dictionary->SetString("title", notification.title());
dictionary->SetString("body", notification.body());
@@ -104,10 +105,11 @@ static DictionaryValue* SerializeNotification(
return dictionary;
}
-void AppLauncherHandler::CreateAppInfo(const Extension* extension,
- const AppNotification* notification,
- ExtensionService* service,
- DictionaryValue* value) {
+void AppLauncherHandler::CreateAppInfo(
+ const Extension* extension,
+ const extensions::AppNotification* notification,
+ ExtensionService* service,
+ DictionaryValue* value) {
value->Clear();
// The Extension class 'helpfully' wraps bidi control characters that
@@ -249,7 +251,7 @@ void AppLauncherHandler::Observe(int type,
case chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED: {
const std::string& id =
*content::Details<const std::string>(details).ptr();
- const AppNotification* notification =
+ const extensions::AppNotification* notification =
extension_service_->app_notification_manager()->GetLast(id);
base::StringValue id_value(id);
if (notification) {
@@ -406,7 +408,7 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) {
}
DictionaryValue* AppLauncherHandler::GetAppInfo(const Extension* extension) {
- AppNotificationManager* notification_manager =
+ extensions::AppNotificationManager* notification_manager =
extension_service_->app_notification_manager();
DictionaryValue* app_info = new DictionaryValue();
// CreateAppInfo can change the extension prefs.
@@ -773,7 +775,7 @@ void AppLauncherHandler::HandleNotificationClose(const ListValue* args) {
UMA_HISTOGRAM_COUNTS("AppNotification.NTPNotificationClosed", 1);
- AppNotificationManager* notification_manager =
+ extensions::AppNotificationManager* notification_manager =
extension_service_->app_notification_manager();
notification_manager->ClearAll(extension_id);
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698