OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/tools/test_shell/notification_presenter.h" | 5 #include "webkit/tools/test_shell/notification_presenter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotification.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotification.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPermis
sionCallback.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPermis
sionCallback.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
17 | 17 |
18 using WebKit::WebNotification; | 18 using WebKit::WebNotification; |
19 using WebKit::WebNotificationPresenter; | 19 using WebKit::WebNotificationPresenter; |
20 using WebKit::WebNotificationPermissionCallback; | 20 using WebKit::WebNotificationPermissionCallback; |
21 using WebKit::WebSecurityOrigin; | 21 using WebKit::WebSecurityOrigin; |
22 using WebKit::WebString; | 22 using WebKit::WebString; |
23 using WebKit::WebTextDirectionRightToLeft; | 23 using WebKit::WebTextDirectionRightToLeft; |
24 using WebKit::WebURL; | 24 using WebKit::WebURL; |
25 | 25 |
26 namespace { | 26 namespace { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 : WebNotificationPresenter::PermissionDenied; | 104 : WebNotificationPresenter::PermissionDenied; |
105 } | 105 } |
106 | 106 |
107 void TestNotificationPresenter::requestPermission( | 107 void TestNotificationPresenter::requestPermission( |
108 const WebSecurityOrigin& origin, | 108 const WebSecurityOrigin& origin, |
109 WebNotificationPermissionCallback* callback) { | 109 WebNotificationPermissionCallback* callback) { |
110 printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", | 110 printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", |
111 origin.toString().utf8().data()); | 111 origin.toString().utf8().data()); |
112 callback->permissionRequestComplete(); | 112 callback->permissionRequestComplete(); |
113 } | 113 } |
OLD | NEW |