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

Side by Side Diff: chrome/default_plugin/plugin_impl_gtk.cc

Issue 8473001: Show missing plug-in infobar only if a plug-in is available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « chrome/default_plugin/plugin_impl_aura.cc ('k') | chrome/default_plugin/plugin_impl_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/default_plugin/plugin_impl_aura.cc ('k') | chrome/default_plugin/plugin_impl_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698