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

Side by Side Diff: plugin/linux/main_linux.cc

Issue 2825074: Initial version rendering 2D path for O3D. This will eventually allow O3D app... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/o3d/
Patch Set: '' Created 10 years, 3 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
« no previous file with comments | « plugin/idl/idl.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 NPN_ReleaseObject(obj); 771 NPN_ReleaseObject(obj);
772 instance->pdata = NULL; 772 instance->pdata = NULL;
773 } 773 }
774 return NPERR_NO_ERROR; 774 return NPERR_NO_ERROR;
775 } 775 }
776 776
777 NPError NPP_SetWindow(NPP instance, NPWindow *window) { 777 NPError NPP_SetWindow(NPP instance, NPWindow *window) {
778 HANDLE_CRASHES; 778 HANDLE_CRASHES;
779 PluginObject *obj = static_cast<PluginObject*>(instance->pdata); 779 PluginObject *obj = static_cast<PluginObject*>(instance->pdata);
780 780
781
781 NPSetWindowCallbackStruct *cb_struct = 782 NPSetWindowCallbackStruct *cb_struct =
782 static_cast<NPSetWindowCallbackStruct *>(window->ws_info); 783 static_cast<NPSetWindowCallbackStruct *>(window->ws_info);
783 Window xwindow = reinterpret_cast<Window>(window->window); 784 Window xwindow = reinterpret_cast<Window>(window->window);
784 if (xwindow != obj->window_) { 785 if (xwindow != obj->window_) {
785 Display *display = cb_struct->display; 786 Display *display = cb_struct->display;
786 Window drawable = xwindow; 787 Window drawable = xwindow;
787 if (g_xembed_support) { 788 if (g_xembed_support) {
788 // We asked for a XEmbed plugin, the xwindow is a GtkSocket, we create 789 // We asked for a XEmbed plugin, the xwindow is a GtkSocket, we create
789 // a GtkPlug to go into it. 790 // a GtkPlug to go into it.
790 obj->gdk_display_ = gdk_display_open(XDisplayString(display)); 791 obj->gdk_display_ = gdk_display_open(XDisplayString(display));
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 client()->SendResizeEvent(renderer()->width(), renderer()->height(), 997 client()->SendResizeEvent(renderer()->width(), renderer()->height(),
997 false); 998 false);
998 SetGtkEventSource(gtk_container_); 999 SetGtkEventSource(gtk_container_);
999 gtk_widget_destroy(gtk_fullscreen_container_); 1000 gtk_widget_destroy(gtk_fullscreen_container_);
1000 gtk_fullscreen_container_ = NULL; 1001 gtk_fullscreen_container_ = NULL;
1001 fullscreen_window_ = 0; 1002 fullscreen_window_ = 0;
1002 fullscreen_ = false; 1003 fullscreen_ = false;
1003 } 1004 }
1004 } // namespace _o3d 1005 } // namespace _o3d
1005 } // namespace glue 1006 } // namespace glue
OLDNEW
« no previous file with comments | « plugin/idl/idl.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698