| OLD | NEW |
| 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/default_plugin/plugin_impl_mac.h" | 5 #include "chrome/default_plugin/plugin_impl_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 PluginInstallerImpl::~PluginInstallerImpl() { | 35 PluginInstallerImpl::~PluginInstallerImpl() { |
| 36 [command_ release]; | 36 [command_ release]; |
| 37 } | 37 } |
| 38 | 38 |
| 39 bool PluginInstallerImpl::Initialize(void* module_handle, NPP instance, | 39 bool PluginInstallerImpl::Initialize(void* module_handle, NPP instance, |
| 40 NPMIMEType mime_type, int16 argc, | 40 NPMIMEType mime_type, int16 argc, |
| 41 char* argn[], char* argv[]) { | 41 char* argn[], char* argv[]) { |
| 42 DVLOG(1) << __FUNCTION__ << " MIME Type : " << mime_type; | 42 DVLOG(1) << __FUNCTION__ << " MIME Type : " << mime_type; |
| 43 DCHECK(instance != NULL); | 43 DCHECK(instance != NULL); |
| 44 | 44 |
| 45 if (mime_type == NULL || strlen(mime_type) == 0) { | 45 if (mime_type == NULL || *mime_type == '\0') { |
| 46 DLOG(WARNING) << __FUNCTION__ << " Invalid parameters passed in"; | 46 DLOG(WARNING) << __FUNCTION__ << " Invalid parameters passed in"; |
| 47 NOTREACHED(); | 47 NOTREACHED(); |
| 48 return false; | 48 return false; |
| 49 } | 49 } |
| 50 | 50 |
| 51 instance_ = instance; | 51 instance_ = instance; |
| 52 mime_type_ = mime_type; | 52 mime_type_ = mime_type; |
| 53 | 53 |
| 54 command_ = [l10n_util::FixUpWindowsStyleLabel(l10n_util::GetStringUTF16( | 54 command_ = [l10n_util::FixUpWindowsStyleLabel(l10n_util::GetStringUTF16( |
| 55 IDS_DEFAULT_PLUGIN_NO_PLUGIN_AVAILABLE_MSG)) retain]; | 55 IDS_DEFAULT_PLUGIN_NO_PLUGIN_AVAILABLE_MSG)) retain]; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 } | 195 } |
| 196 | 196 |
| 197 void PluginInstallerImpl::NotifyPluginStatus(int status) { | 197 void PluginInstallerImpl::NotifyPluginStatus(int status) { |
| 198 ChildThread::current()->Send( | 198 ChildThread::current()->Send( |
| 199 new ChromePluginProcessHostMsg_MissingPluginStatus( | 199 new ChromePluginProcessHostMsg_MissingPluginStatus( |
| 200 status, | 200 status, |
| 201 renderer_process_id(), | 201 renderer_process_id(), |
| 202 render_view_id(), | 202 render_view_id(), |
| 203 0)); | 203 0)); |
| 204 } | 204 } |
| OLD | NEW |