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

Side by Side Diff: content/browser/renderer_host/gtk_plugin_container.cc

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 7 years, 5 months 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
OLDNEW
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 "webkit/plugins/npapi/gtk_plugin_container.h" 5 #include "content/browser/renderer_host/gtk_plugin_container.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
11 namespace webkit { 11 namespace content {
12 namespace npapi {
13 12
14 namespace { 13 namespace {
15 14
16 // NOTE: This class doesn't have constructors/destructors, it is created 15 // NOTE: This class doesn't have constructors/destructors, it is created
17 // through GLib's object management. 16 // through GLib's object management.
18 class GtkPluginContainer : public GtkSocket { 17 class GtkPluginContainer : public GtkSocket {
19 public: 18 public:
20 // Sets the requested size of the widget. 19 // Sets the requested size of the widget.
21 void set_size(int width, int height) { 20 void set_size(int width, int height) {
22 width_ = width; 21 width_ = width;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 GtkWidget* gtk_plugin_container_new() { 79 GtkWidget* gtk_plugin_container_new() {
81 return GTK_WIDGET(g_object_new(GtkPluginContainer::GetType(), NULL)); 80 return GTK_WIDGET(g_object_new(GtkPluginContainer::GetType(), NULL));
82 } 81 }
83 82
84 void gtk_plugin_container_set_size(GtkWidget *widget, int width, int height) { 83 void gtk_plugin_container_set_size(GtkWidget *widget, int width, int height) {
85 GtkPluginContainer::CastChecked(widget)->set_size(width, height); 84 GtkPluginContainer::CastChecked(widget)->set_size(width, height);
86 // Signal the parent that the size request has changed. 85 // Signal the parent that the size request has changed.
87 gtk_widget_queue_resize_no_redraw(widget); 86 gtk_widget_queue_resize_no_redraw(widget);
88 } 87 }
89 88
90 } // namespace npapi 89 } // namespace content
91 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698