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

Side by Side Diff: extensions/renderer/set_icon_natives.cc

Issue 343003003: Move IPC traits for SkBitmap, gfx_geometry into ui/gfx/ipc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months 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 | Annotate | Revision Log
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 #include "extensions/renderer/set_icon_natives.h" 5 #include "extensions/renderer/set_icon_natives.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/common/common_param_traits.h" 10 #include "content/public/common/common_param_traits.h"
11 #include "extensions/renderer/request_sender.h" 11 #include "extensions/renderer/request_sender.h"
12 #include "extensions/renderer/script_context.h" 12 #include "extensions/renderer/script_context.h"
13 #include "ipc/ipc_message_utils.h" 13 #include "ipc/ipc_message_utils.h"
14 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
15 #include "ui/gfx/ipc/gfx_param_traits.h"
15 16
16 namespace { 17 namespace {
17 18
18 const char* kImageSizeKeys[] = {"19", "38"}; 19 const char* kImageSizeKeys[] = {"19", "38"};
19 const char kInvalidDimensions[] = "ImageData has invalid dimensions."; 20 const char kInvalidDimensions[] = "ImageData has invalid dimensions.";
20 const char kInvalidData[] = "ImageData data length does not match dimensions."; 21 const char kInvalidData[] = "ImageData data length does not match dimensions.";
21 const char kNoMemory[] = "Chrome was unable to initialize icon."; 22 const char kNoMemory[] = "Chrome was unable to initialize icon.";
22 23
23 } // namespace 24 } // namespace
24 25
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 std::string name = *v8::String::Utf8Value(args[0]); 155 std::string name = *v8::String::Utf8Value(args[0]);
155 int request_id = args[2]->Int32Value(); 156 int request_id = args[2]->Int32Value();
156 bool has_callback = args[3]->BooleanValue(); 157 bool has_callback = args[3]->BooleanValue();
157 bool for_io_thread = args[4]->BooleanValue(); 158 bool for_io_thread = args[4]->BooleanValue();
158 159
159 request_sender_->StartRequest( 160 request_sender_->StartRequest(
160 context(), name, request_id, has_callback, for_io_thread, &list_value); 161 context(), name, request_id, has_callback, for_io_thread, &list_value);
161 } 162 }
162 163
163 } // namespace extensions 164 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698