| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 if (mime_type == NULL || strlen(mime_type) == 0) { | 43 if (mime_type == NULL || strlen(mime_type) == 0) { |
| 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 PluginInstallerBase::SetRoutingIds(argc, argn, argv); |
| 53 argc, argn, argv); | 53 return true; |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool PluginInstallerImpl::NPP_SetWindow(NPWindow* window_info) { | 56 bool PluginInstallerImpl::NPP_SetWindow(NPWindow* window_info) { |
| 57 if (container_) | 57 if (container_) |
| 58 gtk_widget_destroy(container_); | 58 gtk_widget_destroy(container_); |
| 59 container_ = gtk_plug_new(reinterpret_cast<XID>(window_info->window)); | 59 container_ = gtk_plug_new(reinterpret_cast<XID>(window_info->window)); |
| 60 | 60 |
| 61 // Add label. | 61 // Add label. |
| 62 GtkWidget* box = gtk_vbox_new(FALSE, 0); | 62 GtkWidget* box = gtk_vbox_new(FALSE, 0); |
| 63 GtkWidget* label = gtk_label_new("Missing Plug-in"); | 63 GtkWidget* label = gtk_label_new("Missing Plug-in"); |
| (...skipping 74 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 |