| OLD | NEW |
| 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 #include "extensions/renderer/set_icon_natives.h" | 5 #include "extensions/renderer/set_icon_natives.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
| 16 #include "extensions/renderer/request_sender.h" | 16 #include "extensions/renderer/request_sender.h" |
| 17 #include "extensions/renderer/script_context.h" | 17 #include "extensions/renderer/script_context.h" |
| 18 #include "ipc/ipc_message_utils.h" | 18 #include "ipc/ipc_message_utils.h" |
| 19 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h" | 19 #include "third_party/WebKit/public/web/WebArrayBufferConverter.h" |
| 20 #include "third_party/skia/include/core/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
| 21 #include "ui/gfx/ipc/gfx_param_traits.h" | |
| 22 | 21 |
| 23 namespace { | 22 namespace { |
| 24 | 23 |
| 25 const char kInvalidDimensions[] = "ImageData has invalid dimensions."; | 24 const char kInvalidDimensions[] = "ImageData has invalid dimensions."; |
| 26 const char kInvalidData[] = "ImageData data length does not match dimensions."; | 25 const char kInvalidData[] = "ImageData data length does not match dimensions."; |
| 27 const char kNoMemory[] = "Chrome was unable to initialize icon."; | 26 const char kNoMemory[] = "Chrome was unable to initialize icon."; |
| 28 | 27 |
| 29 } // namespace | 28 } // namespace |
| 30 | 29 |
| 31 namespace extensions { | 30 namespace extensions { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 bitmap_set_value); | 146 bitmap_set_value); |
| 148 if (details->Has(v8::String::NewFromUtf8(args.GetIsolate(), "tabId"))) { | 147 if (details->Has(v8::String::NewFromUtf8(args.GetIsolate(), "tabId"))) { |
| 149 dict->Set( | 148 dict->Set( |
| 150 v8::String::NewFromUtf8(args.GetIsolate(), "tabId"), | 149 v8::String::NewFromUtf8(args.GetIsolate(), "tabId"), |
| 151 details->Get(v8::String::NewFromUtf8(args.GetIsolate(), "tabId"))); | 150 details->Get(v8::String::NewFromUtf8(args.GetIsolate(), "tabId"))); |
| 152 } | 151 } |
| 153 args.GetReturnValue().Set(dict); | 152 args.GetReturnValue().Set(dict); |
| 154 } | 153 } |
| 155 | 154 |
| 156 } // namespace extensions | 155 } // namespace extensions |
| OLD | NEW |