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/extensions/extension_function_dispatcher.h" | 5 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/common/extensions/extension_set.h" | 27 #include "chrome/common/extensions/extension_set.h" |
28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
29 #include "content/public/browser/render_process_host.h" | 29 #include "content/public/browser/render_process_host.h" |
30 #include "content/public/browser/render_view_host.h" | 30 #include "content/public/browser/render_view_host.h" |
31 #include "ipc/ipc_message.h" | 31 #include "ipc/ipc_message.h" |
32 #include "ipc/ipc_message_macros.h" | 32 #include "ipc/ipc_message_macros.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
34 #include "third_party/skia/include/core/SkBitmap.h" | 34 #include "third_party/skia/include/core/SkBitmap.h" |
35 #include "webkit/glue/resource_type.h" | 35 #include "webkit/glue/resource_type.h" |
36 | 36 |
| 37 using extensions::Extension; |
37 using extensions::ExtensionAPI; | 38 using extensions::ExtensionAPI; |
38 using content::RenderViewHost; | 39 using content::RenderViewHost; |
39 using WebKit::WebSecurityOrigin; | 40 using WebKit::WebSecurityOrigin; |
40 | 41 |
41 namespace { | 42 namespace { |
42 | 43 |
43 const char kAccessDenied[] = "access denied"; | 44 const char kAccessDenied[] = "access denied"; |
44 const char kQuotaExceeded[] = "quota exceeded"; | 45 const char kQuotaExceeded[] = "quota exceeded"; |
45 | 46 |
46 void LogSuccess(const Extension* extension, | 47 void LogSuccess(const Extension* extension, |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 288 } |
288 | 289 |
289 // static | 290 // static |
290 void ExtensionFunctionDispatcher::SendAccessDenied( | 291 void ExtensionFunctionDispatcher::SendAccessDenied( |
291 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { | 292 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { |
292 ListValue empty_list; | 293 ListValue empty_list; |
293 ipc_sender->Send(new ExtensionMsg_Response( | 294 ipc_sender->Send(new ExtensionMsg_Response( |
294 routing_id, request_id, false, empty_list, | 295 routing_id, request_id, false, empty_list, |
295 "Access to extension API denied.")); | 296 "Access to extension API denied.")); |
296 } | 297 } |
OLD | NEW |