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/notifications/notification_test_util.h" | 5 #include "chrome/browser/notifications/notification_test_util.h" |
6 | 6 |
7 MockNotificationDelegate::MockNotificationDelegate(const std::string& id) | 7 MockNotificationDelegate::MockNotificationDelegate(const std::string& id) |
8 : id_(id) {} | 8 : id_(id) {} |
9 | 9 |
10 MockNotificationDelegate::~MockNotificationDelegate() {} | 10 MockNotificationDelegate::~MockNotificationDelegate() {} |
11 | 11 |
12 std::string MockNotificationDelegate::id() const { return id_; } | 12 std::string MockNotificationDelegate::id() const { return id_; } |
13 | 13 |
14 content::WebContents* MockNotificationDelegate::GetWebContents() const { | 14 content::WebContents* MockNotificationDelegate::GetWebContents() const { |
15 return NULL; | 15 return NULL; |
16 } | 16 } |
17 | 17 |
| 18 // TODO(peter): |notification_| should be initialized with the correct origin. |
18 StubNotificationUIManager::StubNotificationUIManager(const GURL& welcome_origin) | 19 StubNotificationUIManager::StubNotificationUIManager(const GURL& welcome_origin) |
19 : notification_(GURL(), | 20 : notification_(GURL(), |
20 GURL(), | |
21 base::string16(), | 21 base::string16(), |
22 base::string16(), | 22 base::string16(), |
23 blink::WebTextDirectionDefault, | 23 gfx::Image(), |
24 base::string16(), | 24 base::string16(), |
25 base::string16(), | 25 base::string16(), |
26 new MockNotificationDelegate("stub")), | 26 new MockNotificationDelegate("stub")), |
27 profile_(NULL), | 27 profile_(NULL), |
28 welcome_origin_(welcome_origin), | 28 welcome_origin_(welcome_origin), |
29 welcomed_(false), | 29 welcomed_(false), |
30 added_notifications_(0U) { | 30 added_notifications_(0U) { |
31 } | 31 } |
32 | 32 |
33 StubNotificationUIManager::~StubNotificationUIManager() {} | 33 StubNotificationUIManager::~StubNotificationUIManager() {} |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 bool StubNotificationUIManager::CancelAllBySourceOrigin( | 79 bool StubNotificationUIManager::CancelAllBySourceOrigin( |
80 const GURL& source_origin) { | 80 const GURL& source_origin) { |
81 return false; | 81 return false; |
82 } | 82 } |
83 | 83 |
84 bool StubNotificationUIManager::CancelAllByProfile(ProfileID profile_id) { | 84 bool StubNotificationUIManager::CancelAllByProfile(ProfileID profile_id) { |
85 return false; | 85 return false; |
86 } | 86 } |
87 | 87 |
88 void StubNotificationUIManager::CancelAll() {} | 88 void StubNotificationUIManager::CancelAll() {} |
OLD | NEW |