| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/utility/utility_thread.h" | 5 #include "chrome/utility/utility_thread.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/common/child_process.h" | 9 #include "chrome/common/child_process.h" |
| 10 #include "chrome/common/extensions/extension_unpacker.h" | 10 #include "chrome/common/extensions/extension_unpacker.h" |
| 11 #include "chrome/common/extensions/update_manifest.h" | 11 #include "chrome/common/extensions/update_manifest.h" |
| 12 #include "chrome/common/render_messages.h" | 12 #include "chrome/common/utility_messages.h" |
| 13 #include "chrome/common/web_resource/web_resource_unpacker.h" | 13 #include "chrome/common/web_resource/web_resource_unpacker.h" |
| 14 #include "third_party/skia/include/core/SkBitmap.h" |
| 14 | 15 |
| 15 UtilityThread::UtilityThread() { | 16 UtilityThread::UtilityThread() { |
| 16 ChildProcess::current()->AddRefProcess(); | 17 ChildProcess::current()->AddRefProcess(); |
| 17 } | 18 } |
| 18 | 19 |
| 19 UtilityThread::~UtilityThread() { | 20 UtilityThread::~UtilityThread() { |
| 20 } | 21 } |
| 21 | 22 |
| 22 void UtilityThread::OnControlMessageReceived(const IPC::Message& msg) { | 23 void UtilityThread::OnControlMessageReceived(const IPC::Message& msg) { |
| 23 IPC_BEGIN_MESSAGE_MAP(UtilityThread, msg) | 24 IPC_BEGIN_MESSAGE_MAP(UtilityThread, msg) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 58 |
| 58 void UtilityThread::OnParseUpdateManifest(const std::string& xml) { | 59 void UtilityThread::OnParseUpdateManifest(const std::string& xml) { |
| 59 UpdateManifest manifest; | 60 UpdateManifest manifest; |
| 60 if (!manifest.Parse(xml)) { | 61 if (!manifest.Parse(xml)) { |
| 61 Send(new UtilityHostMsg_ParseUpdateManifest_Failed(manifest.errors())); | 62 Send(new UtilityHostMsg_ParseUpdateManifest_Failed(manifest.errors())); |
| 62 } else { | 63 } else { |
| 63 Send(new UtilityHostMsg_ParseUpdateManifest_Succeeded(manifest.results())); | 64 Send(new UtilityHostMsg_ParseUpdateManifest_Succeeded(manifest.results())); |
| 64 } | 65 } |
| 65 ChildProcess::current()->ReleaseProcess(); | 66 ChildProcess::current()->ReleaseProcess(); |
| 66 } | 67 } |
| OLD | NEW |