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

Side by Side Diff: chrome/browser/ui/webui/web_ui_util.cc

Issue 9481008: Move GenericHandler back to Chrome since it was really Chrome specific (i.e. chrome's mapping of cl… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 (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 "chrome/browser/ui/webui/web_ui_util.h" 5 #include "chrome/browser/ui/webui/web_ui_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "content/browser/disposition_utils.h" 11 #include "chrome/browser/disposition_utils.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/gfx/codec/png_codec.h" 13 #include "ui/gfx/codec/png_codec.h"
14 14
15 namespace web_ui_util { 15 namespace web_ui_util {
16 16
17 std::string GetImageDataUrl(const SkBitmap& bitmap) { 17 std::string GetImageDataUrl(const SkBitmap& bitmap) {
18 std::vector<unsigned char> output; 18 std::vector<unsigned char> output;
19 gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false, &output); 19 gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false, &output);
20 std::string str_url; 20 std::string str_url;
21 str_url.insert(str_url.end(), output.begin(), output.end()); 21 str_url.insert(str_url.end(), output.begin(), output.end());
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 CHECK(args->GetBoolean(start_index++, &alt_key)); 53 CHECK(args->GetBoolean(start_index++, &alt_key));
54 CHECK(args->GetBoolean(start_index++, &ctrl_key)); 54 CHECK(args->GetBoolean(start_index++, &ctrl_key));
55 CHECK(args->GetBoolean(start_index++, &meta_key)); 55 CHECK(args->GetBoolean(start_index++, &meta_key));
56 CHECK(args->GetBoolean(start_index++, &shift_key)); 56 CHECK(args->GetBoolean(start_index++, &shift_key));
57 return disposition_utils::DispositionFromClick(button == 1.0, alt_key, 57 return disposition_utils::DispositionFromClick(button == 1.0, alt_key,
58 ctrl_key, meta_key, shift_key); 58 ctrl_key, meta_key, shift_key);
59 59
60 } 60 }
61 61
62 } // namespace web_ui_util 62 } // namespace web_ui_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698