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

Side by Side Diff: content/shell/browser/layout_test/layout_test_notification_manager.h

Issue 1422673002: Extract Notifications kClickWasNotAnAction constant Base URL: https://chromium.googlesource.com/chromium/src.git@actions_spec_sync
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 10 matching lines...) Expand all
21 struct PlatformNotificationData; 21 struct PlatformNotificationData;
22 22
23 // Responsible for tracking active notifications and allowed origins for the 23 // Responsible for tracking active notifications and allowed origins for the
24 // Web Notification API when running layout tests. 24 // Web Notification API when running layout tests.
25 class LayoutTestNotificationManager : public PlatformNotificationService { 25 class LayoutTestNotificationManager : public PlatformNotificationService {
26 public: 26 public:
27 LayoutTestNotificationManager(); 27 LayoutTestNotificationManager();
28 ~LayoutTestNotificationManager() override; 28 ~LayoutTestNotificationManager() override;
29 29
30 // Simulates a click on the notification titled |title|. |action_index| 30 // Simulates a click on the notification titled |title|. |action_index|
31 // indicates which action was clicked, or -1 if the main notification body was 31 // indicates which action was clicked, or kNotificationClickWasNotAnAction if
32 // clicked. Must be called on the UI thread. 32 // the main notification body was clicked. Must be called on the UI thread.
33 void SimulateClick(const std::string& title, int action_index); 33 void SimulateClick(const std::string& title, int action_index);
34 34
35 // PlatformNotificationService implementation. 35 // PlatformNotificationService implementation.
36 blink::WebNotificationPermission CheckPermissionOnUIThread( 36 blink::WebNotificationPermission CheckPermissionOnUIThread(
37 BrowserContext* browser_context, 37 BrowserContext* browser_context,
38 const GURL& origin, 38 const GURL& origin,
39 int render_process_id) override; 39 int render_process_id) override;
40 blink::WebNotificationPermission CheckPermissionOnIOThread( 40 blink::WebNotificationPermission CheckPermissionOnIOThread(
41 ResourceContext* resource_context, 41 ResourceContext* resource_context,
42 const GURL& origin, 42 const GURL& origin,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 std::map<std::string, std::string> replacements_; 87 std::map<std::string, std::string> replacements_;
88 88
89 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_; 89 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager); 91 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager);
92 }; 92 };
93 93
94 } // content 94 } // content
95 95
96 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 96 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698