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

Side by Side Diff: chrome/browser/image_decoder.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: Revert ImageDecoder changes. 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/login.html » ('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) 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_IMAGE_DECODER_H_ 5 #ifndef CHROME_BROWSER_IMAGE_DECODER_H_
6 #define CHROME_BROWSER_IMAGE_DECODER_H_ 6 #define CHROME_BROWSER_IMAGE_DECODER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 ImageDecoder(Delegate* delegate, 37 ImageDecoder(Delegate* delegate,
38 const std::string& image_data); 38 const std::string& image_data);
39 39
40 // Starts image decoding. 40 // Starts image decoding.
41 void Start(); 41 void Start();
42 42
43 const std::vector<unsigned char>& get_image_data() const { 43 const std::vector<unsigned char>& get_image_data() const {
44 return image_data_; 44 return image_data_;
45 } 45 }
46 46
47 void set_delegate(Delegate* delegate) { delegate_ = delegate; }
48
47 private: 49 private:
48 // It's a reference counted object, so destructor is private. 50 // It's a reference counted object, so destructor is private.
49 virtual ~ImageDecoder(); 51 virtual ~ImageDecoder();
50 52
51 // Overidden from UtilityProcessHostClient: 53 // Overidden from UtilityProcessHostClient:
52 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
53 55
54 // IPC message handlers. 56 // IPC message handlers.
55 void OnDecodeImageSucceeded(const SkBitmap& decoded_image); 57 void OnDecodeImageSucceeded(const SkBitmap& decoded_image);
56 void OnDecodeImageFailed(); 58 void OnDecodeImageFailed();
57 59
58 // Launches sandboxed process that will decode the image. 60 // Launches sandboxed process that will decode the image.
59 void DecodeImageInSandbox(const std::vector<unsigned char>& image_data); 61 void DecodeImageInSandbox(const std::vector<unsigned char>& image_data);
60 62
61 Delegate* delegate_; 63 Delegate* delegate_;
62 std::vector<unsigned char> image_data_; 64 std::vector<unsigned char> image_data_;
63 content::BrowserThread::ID target_thread_id_; 65 content::BrowserThread::ID target_thread_id_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(ImageDecoder); 67 DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
66 }; 68 };
67 69
68 #endif // CHROME_BROWSER_IMAGE_DECODER_H_ 70 #endif // CHROME_BROWSER_IMAGE_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/login.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698