OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_gtk.h" | 5 #include "chrome/default_plugin/plugin_impl_gtk.h" |
6 | 6 |
7 #include <X11/Xdefs.h> | 7 #include <X11/Xdefs.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 22 matching lines...) Expand all Loading... | |
33 if (container_) | 33 if (container_) |
34 gtk_widget_destroy(container_); | 34 gtk_widget_destroy(container_); |
35 } | 35 } |
36 | 36 |
37 bool PluginInstallerImpl::Initialize(void* module_handle, NPP instance, | 37 bool PluginInstallerImpl::Initialize(void* module_handle, NPP instance, |
38 NPMIMEType mime_type, int16 argc, | 38 NPMIMEType mime_type, int16 argc, |
39 char* argn[], char* argv[]) { | 39 char* argn[], char* argv[]) { |
40 DVLOG(1) << __FUNCTION__ << " MIME Type : " << mime_type; | 40 DVLOG(1) << __FUNCTION__ << " MIME Type : " << mime_type; |
41 DCHECK(instance != NULL); | 41 DCHECK(instance != NULL); |
42 | 42 |
43 if (mime_type == NULL || strlen(mime_type) == 0) { | 43 if (mime_type == NULL || *mime_type == L'\0') { |
tony
2011/10/20 20:24:54
Why L?
grt (UTC plus 2)
2011/10/20 20:52:31
Because I goofed.
| |
44 DLOG(WARNING) << __FUNCTION__ << " Invalid parameters passed in"; | 44 DLOG(WARNING) << __FUNCTION__ << " Invalid parameters passed in"; |
45 NOTREACHED(); | 45 NOTREACHED(); |
46 return false; | 46 return false; |
47 } | 47 } |
48 | 48 |
49 instance_ = instance; | 49 instance_ = instance; |
50 mime_type_ = mime_type; | 50 mime_type_ = mime_type; |
51 | 51 |
52 return PluginInstallerBase::Initialize(module_handle, instance, mime_type, | 52 return PluginInstallerBase::Initialize(module_handle, instance, mime_type, |
53 argc, argn, argv); | 53 argc, argn, argv); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 } | 138 } |
139 | 139 |
140 void PluginInstallerImpl::NotifyPluginStatus(int status) { | 140 void PluginInstallerImpl::NotifyPluginStatus(int status) { |
141 ChildThread::current()->Send( | 141 ChildThread::current()->Send( |
142 new ChromePluginProcessHostMsg_MissingPluginStatus( | 142 new ChromePluginProcessHostMsg_MissingPluginStatus( |
143 status, | 143 status, |
144 renderer_process_id(), | 144 renderer_process_id(), |
145 render_view_id(), | 145 render_view_id(), |
146 0)); | 146 0)); |
147 } | 147 } |
OLD | NEW |