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

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

Issue 2857293002: Linux native notifications: Add notify and close tests (Closed)
Patch Set: Rebase Created 3 years, 7 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 | « no previous file | chrome/browser/notifications/notification_platform_bridge_linux_unittest.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/notification_platform_bridge_linux.h" 5 #include "chrome/browser/notifications/notification_platform_bridge_linux.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // added at the end, before NUM_ITEMS. 48 // added at the end, before NUM_ITEMS.
49 enum class ConnectionInitializationStatusCode { 49 enum class ConnectionInitializationStatusCode {
50 SUCCESS = 0, 50 SUCCESS = 0,
51 NATIVE_NOTIFICATIONS_NOT_SUPPORTED = 1, 51 NATIVE_NOTIFICATIONS_NOT_SUPPORTED = 1,
52 MISSING_REQUIRED_CAPABILITIES = 2, 52 MISSING_REQUIRED_CAPABILITIES = 2,
53 COULD_NOT_CONNECT_TO_SIGNALS = 3, 53 COULD_NOT_CONNECT_TO_SIGNALS = 3,
54 NUM_ITEMS 54 NUM_ITEMS
55 }; 55 };
56 56
57 gfx::Image DeepCopyImage(const gfx::Image& image) { 57 gfx::Image DeepCopyImage(const gfx::Image& image) {
58 if (image.IsEmpty())
59 return gfx::Image();
58 std::unique_ptr<gfx::ImageSkia> image_skia(image.CopyImageSkia()); 60 std::unique_ptr<gfx::ImageSkia> image_skia(image.CopyImageSkia());
59 return gfx::Image(*image_skia); 61 return gfx::Image(*image_skia);
60 } 62 }
61 63
62 int NotificationPriorityToFdoUrgency(int priority) { 64 int NotificationPriorityToFdoUrgency(int priority) {
63 enum FdoUrgency { 65 enum FdoUrgency {
64 LOW = 0, 66 LOW = 0,
65 NORMAL = 1, 67 NORMAL = 1,
66 CRITICAL = 2, 68 CRITICAL = 2,
67 }; 69 };
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 } 736 }
735 737
736 void NotificationPlatformBridgeLinux::SetReadyCallback( 738 void NotificationPlatformBridgeLinux::SetReadyCallback(
737 NotificationBridgeReadyCallback callback) { 739 NotificationBridgeReadyCallback callback) {
738 impl_->SetReadyCallback(std::move(callback)); 740 impl_->SetReadyCallback(std::move(callback));
739 } 741 }
740 742
741 void NotificationPlatformBridgeLinux::CleanUp() { 743 void NotificationPlatformBridgeLinux::CleanUp() {
742 impl_->CleanUp(); 744 impl_->CleanUp();
743 } 745 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698