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

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

Issue 10532048: [cros] Initial WebRTC-enabled implementation of user image picker on OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup and addressed comments Created 8 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 (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 #ifndef CHROME_BROWSER_UI_WEBUI_WEB_UI_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_WEB_UI_UTIL_H_
6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_UTIL_H_ 6 #define CHROME_BROWSER_UI_WEBUI_WEB_UI_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 std::string GetImageDataUrl(const gfx::ImageSkia& image); 22 std::string GetImageDataUrl(const gfx::ImageSkia& image);
23 23
24 // Convenience routine to get data url that corresponds to given 24 // Convenience routine to get data url that corresponds to given
25 // resource_id as an image. This function does not check if the 25 // resource_id as an image. This function does not check if the
26 // resource for the |resource_id| is an image, therefore it is the 26 // resource for the |resource_id| is an image, therefore it is the
27 // caller's responsibility to make sure the resource is indeed an 27 // caller's responsibility to make sure the resource is indeed an
28 // image. Returns empty string if a resource does not exist for given 28 // image. Returns empty string if a resource does not exist for given
29 // |resource_id|. 29 // |resource_id|.
30 std::string GetImageDataUrlFromResource(int resource_id); 30 std::string GetImageDataUrlFromResource(int resource_id);
31 31
32 // Convenience routine to convert data url to an ImageSkia object.
33 gfx::ImageSkia GetImageFromDataUrl(const std::string& data_url);
34
32 // Extracts a disposition from click event arguments. |args| should contain 35 // Extracts a disposition from click event arguments. |args| should contain
33 // an integer button and booleans alt key, ctrl key, meta key, and shift key 36 // an integer button and booleans alt key, ctrl key, meta key, and shift key
34 // (in that order), starting at |start_index|. 37 // (in that order), starting at |start_index|.
35 WindowOpenDisposition GetDispositionFromClick(const ListValue* args, 38 WindowOpenDisposition GetDispositionFromClick(const ListValue* args,
36 int start_index); 39 int start_index);
37 40
38 } // namespace web_ui_util 41 } // namespace web_ui_util
39 42
40 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_UTIL_H_ 43 #endif // CHROME_BROWSER_UI_WEBUI_WEB_UI_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698