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

Side by Side Diff: chrome/browser/chromeos/login/image_decoder.cc

Issue 7631063: Prefix all IPC messages used by src\chrome with Chrome. For e.g ChromeViewMsg_, ChromeViewHostMsg... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/chromeos/login/image_decoder.h" 5 #include "chrome/browser/chromeos/login/image_decoder.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/common/chrome_utility_messages.h" 8 #include "chrome/common/chrome_utility_messages.h"
9 #include "content/browser/browser_thread.h" 9 #include "content/browser/browser_thread.h"
10 10
(...skipping 16 matching lines...) Expand all
27 BrowserThread::PostTask( 27 BrowserThread::PostTask(
28 BrowserThread::IO, FROM_HERE, 28 BrowserThread::IO, FROM_HERE,
29 NewRunnableMethod( 29 NewRunnableMethod(
30 this, &ImageDecoder::DecodeImageInSandbox, 30 this, &ImageDecoder::DecodeImageInSandbox,
31 image_data_)); 31 image_data_));
32 } 32 }
33 33
34 bool ImageDecoder::OnMessageReceived(const IPC::Message& message) { 34 bool ImageDecoder::OnMessageReceived(const IPC::Message& message) {
35 bool handled = true; 35 bool handled = true;
36 IPC_BEGIN_MESSAGE_MAP(ImageDecoder, message) 36 IPC_BEGIN_MESSAGE_MAP(ImageDecoder, message)
37 IPC_MESSAGE_HANDLER(UtilityHostMsg_DecodeImage_Succeeded, 37 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_DecodeImage_Succeeded,
38 OnDecodeImageSucceeded) 38 OnDecodeImageSucceeded)
39 IPC_MESSAGE_HANDLER(UtilityHostMsg_DecodeImage_Failed, OnDecodeImageFailed) 39 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_DecodeImage_Failed,
40 OnDecodeImageFailed)
40 IPC_MESSAGE_UNHANDLED(handled = false) 41 IPC_MESSAGE_UNHANDLED(handled = false)
41 IPC_END_MESSAGE_MAP_EX() 42 IPC_END_MESSAGE_MAP_EX()
42 return handled; 43 return handled;
43 } 44 }
44 45
45 void ImageDecoder::OnDecodeImageSucceeded(const SkBitmap& decoded_image) { 46 void ImageDecoder::OnDecodeImageSucceeded(const SkBitmap& decoded_image) {
46 DCHECK(BrowserThread::CurrentlyOn(target_thread_id_)); 47 DCHECK(BrowserThread::CurrentlyOn(target_thread_id_));
47 if (delegate_) 48 if (delegate_)
48 delegate_->OnImageDecoded(this, decoded_image); 49 delegate_->OnImageDecoded(this, decoded_image);
49 } 50 }
50 51
51 void ImageDecoder::OnDecodeImageFailed() { 52 void ImageDecoder::OnDecodeImageFailed() {
52 DCHECK(BrowserThread::CurrentlyOn(target_thread_id_)); 53 DCHECK(BrowserThread::CurrentlyOn(target_thread_id_));
53 if (delegate_) 54 if (delegate_)
54 delegate_->OnDecodeImageFailed(this); 55 delegate_->OnDecodeImageFailed(this);
55 } 56 }
56 57
57 void ImageDecoder::DecodeImageInSandbox( 58 void ImageDecoder::DecodeImageInSandbox(
58 const std::vector<unsigned char>& image_data) { 59 const std::vector<unsigned char>& image_data) {
59 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
60 UtilityProcessHost* utility_process_host = 61 UtilityProcessHost* utility_process_host =
61 new UtilityProcessHost(this, 62 new UtilityProcessHost(this,
62 target_thread_id_); 63 target_thread_id_);
63 utility_process_host->Send(new UtilityMsg_DecodeImage(image_data)); 64 utility_process_host->Send(new ChromeUtilityMsg_DecodeImage(image_data));
64 } 65 }
65 66
66 } // namespace chromeos 67 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/status/memory_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698