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

Unified Diff: chrome/browser/chromeos/login/image_decoder.h

Issue 8510069: Make ProfileImageDownloader available to non-chromeos code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/captcha_view.h ('k') | chrome/browser/chromeos/login/image_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/image_decoder.h
diff --git a/chrome/browser/chromeos/login/image_decoder.h b/chrome/browser/chromeos/login/image_decoder.h
deleted file mode 100644
index c60f248b58de5cd5de3becc82af047129b201bc2..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/login/image_decoder.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_IMAGE_DECODER_H_
-#define CHROME_BROWSER_CHROMEOS_LOGIN_IMAGE_DECODER_H_
-#pragma once
-
-#include <string>
-#include <vector>
-
-#include "content/browser/utility_process_host.h"
-
-class SkBitmap;
-
-namespace chromeos {
-
-// Decodes an image in a sandboxed process.
-class ImageDecoder : public UtilityProcessHost::Client {
- public:
- class Delegate {
- public:
- // Called when image is decoded.
- // |decoder| is used to identify the image in case of decoding several
- // images simultaneously.
- virtual void OnImageDecoded(const ImageDecoder* decoder,
- const SkBitmap& decoded_image) = 0;
-
- // Called when decoding image failed. Delegate can do some cleanup in
- // this handler.
- virtual void OnDecodeImageFailed(const ImageDecoder* decoder) {}
-
- protected:
- virtual ~Delegate() {}
- };
-
- ImageDecoder(Delegate* delegate,
- const std::string& image_data);
-
- // Starts image decoding.
- void Start();
-
- private:
- // It's a reference counted object, so destructor is private.
- virtual ~ImageDecoder();
-
- // Overidden from UtilityProcessHost::Client:
- virtual bool OnMessageReceived(const IPC::Message& message);
-
- // IPC message handlers.
- void OnDecodeImageSucceeded(const SkBitmap& decoded_image);
- void OnDecodeImageFailed();
-
- // Launches sandboxed process that will decode the image.
- void DecodeImageInSandbox(const std::vector<unsigned char>& image_data);
-
- Delegate* delegate_;
- std::vector<unsigned char> image_data_;
- content::BrowserThread::ID target_thread_id_;
-
- DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
-};
-
-} // namespace chromeos
-
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_IMAGE_DECODER_H_
« no previous file with comments | « chrome/browser/chromeos/login/captcha_view.h ('k') | chrome/browser/chromeos/login/image_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698