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/api/notifications/notifications_api.h" | 5 #include "chrome/browser/extensions/api/notifications/notifications_api.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "ui/message_center/message_center_util.h" | 29 #include "ui/message_center/message_center_util.h" |
30 #include "ui/message_center/notifier_settings.h" | 30 #include "ui/message_center/notifier_settings.h" |
31 #include "url/gurl.h" | 31 #include "url/gurl.h" |
32 | 32 |
33 namespace extensions { | 33 namespace extensions { |
34 | 34 |
35 namespace notifications = api::notifications; | 35 namespace notifications = api::notifications; |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 const char kResultKey[] = "result"; | |
40 const char kMissingRequiredPropertiesForCreateNotification[] = | 39 const char kMissingRequiredPropertiesForCreateNotification[] = |
41 "Some of the required properties are missing: type, iconUrl, title and " | 40 "Some of the required properties are missing: type, iconUrl, title and " |
42 "message."; | 41 "message."; |
43 const char kUnexpectedProgressValueForNonProgressType[] = | 42 const char kUnexpectedProgressValueForNonProgressType[] = |
44 "The progress value should not be specified for non-progress notification"; | 43 "The progress value should not be specified for non-progress notification"; |
45 const char kInvalidProgressValue[] = | 44 const char kInvalidProgressValue[] = |
46 "The progress value should range from 0 to 100"; | 45 "The progress value should range from 0 to 100"; |
47 | 46 |
48 // Converts an object with width, height, and data in RGBA format into an | 47 // Converts an object with width, height, and data in RGBA format into an |
49 // gfx::Image (in ARGB format). | 48 // gfx::Image (in ARGB format). |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 StripScopeFromIdentifier(extension_->id(), *iter), true); | 587 StripScopeFromIdentifier(extension_->id(), *iter), true); |
589 } | 588 } |
590 | 589 |
591 SetResult(result.release()); | 590 SetResult(result.release()); |
592 SendResponse(true); | 591 SendResponse(true); |
593 | 592 |
594 return true; | 593 return true; |
595 } | 594 } |
596 | 595 |
597 } // namespace extensions | 596 } // namespace extensions |
OLD | NEW |