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" | |
10 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotification.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotification.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPermis
sionCallback.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPermis
sionCallback.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
17 | 16 |
18 using WebKit::WebNotification; | 17 using WebKit::WebNotification; |
19 using WebKit::WebNotificationPresenter; | 18 using WebKit::WebNotificationPresenter; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 : WebNotificationPresenter::PermissionDenied; | 103 : WebNotificationPresenter::PermissionDenied; |
105 } | 104 } |
106 | 105 |
107 void TestNotificationPresenter::requestPermission( | 106 void TestNotificationPresenter::requestPermission( |
108 const WebSecurityOrigin& origin, | 107 const WebSecurityOrigin& origin, |
109 WebNotificationPermissionCallback* callback) { | 108 WebNotificationPermissionCallback* callback) { |
110 printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", | 109 printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n", |
111 origin.toString().utf8().data()); | 110 origin.toString().utf8().data()); |
112 callback->permissionRequestComplete(); | 111 callback->permissionRequestComplete(); |
113 } | 112 } |
OLD | NEW |