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

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, 9 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
« no previous file with comments | « chrome/browser/ui/webui/generic_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/logging.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "content/browser/disposition_utils.h" 12 #include "chrome/browser/disposition_utils.h"
12 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/gfx/codec/png_codec.h" 14 #include "ui/gfx/codec/png_codec.h"
14 15
15 namespace web_ui_util { 16 namespace web_ui_util {
16 17
17 std::string GetImageDataUrl(const SkBitmap& bitmap) { 18 std::string GetImageDataUrl(const SkBitmap& bitmap) {
18 std::vector<unsigned char> output; 19 std::vector<unsigned char> output;
19 gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false, &output); 20 gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false, &output);
20 std::string str_url; 21 std::string str_url;
21 str_url.insert(str_url.end(), output.begin(), output.end()); 22 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)); 54 CHECK(args->GetBoolean(start_index++, &alt_key));
54 CHECK(args->GetBoolean(start_index++, &ctrl_key)); 55 CHECK(args->GetBoolean(start_index++, &ctrl_key));
55 CHECK(args->GetBoolean(start_index++, &meta_key)); 56 CHECK(args->GetBoolean(start_index++, &meta_key));
56 CHECK(args->GetBoolean(start_index++, &shift_key)); 57 CHECK(args->GetBoolean(start_index++, &shift_key));
57 return disposition_utils::DispositionFromClick(button == 1.0, alt_key, 58 return disposition_utils::DispositionFromClick(button == 1.0, alt_key,
58 ctrl_key, meta_key, shift_key); 59 ctrl_key, meta_key, shift_key);
59 60
60 } 61 }
61 62
62 } // namespace web_ui_util 63 } // namespace web_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/generic_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698