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

Side by Side Diff: plugin/mac/plugin_mac.mm

Issue 577038: O3D Mac: Add CoreAnimation support (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 8 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/mac/o3d_layer.mm ('k') | plugin/plugin.gyp » ('j') | 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 22 matching lines...) Expand all
33 33
34 #include <GL/glew.h> 34 #include <GL/glew.h>
35 #include "plugin_mac.h" 35 #include "plugin_mac.h"
36 #include "Breakpad.h" 36 #include "Breakpad.h"
37 #include <Cocoa/Cocoa.h> 37 #include <Cocoa/Cocoa.h>
38 #include <QuickTime/QuickTime.h> 38 #include <QuickTime/QuickTime.h>
39 #include "plugin/cross/o3d_glue.h" 39 #include "plugin/cross/o3d_glue.h"
40 #include "plugin/cross/main.h" 40 #include "plugin/cross/main.h"
41 #include "core/mac/display_window_mac.h" 41 #include "core/mac/display_window_mac.h"
42 #include "plugin/mac/graphics_utils_mac.h" 42 #include "plugin/mac/graphics_utils_mac.h"
43 #import "plugin/mac/o3d_layer.h"
44
43 45
44 #if !defined(O3D_INTERNAL_PLUGIN) 46 #if !defined(O3D_INTERNAL_PLUGIN)
45 BreakpadRef gBreakpadRef = NULL; 47 BreakpadRef gBreakpadRef = NULL;
46 #endif 48 #endif
47 49
48 using glue::_o3d::PluginObject; 50 using glue::_o3d::PluginObject;
49 using o3d::DisplayWindowMac; 51 using o3d::DisplayWindowMac;
50 52
51 @interface NSWindowController (plugin_hack) 53 @interface NSWindowController (plugin_hack)
52 - (id)selectedTab; 54 - (id)selectedTab;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 231 }
230 } 232 }
231 233
232 void RenderTimer::TimerCallback(CFRunLoopTimerRef timer, void* info) { 234 void RenderTimer::TimerCallback(CFRunLoopTimerRef timer, void* info) {
233 HANDLE_CRASHES; 235 HANDLE_CRASHES;
234 int instance_count = instances_.size(); 236 int instance_count = instances_.size();
235 for (int i = 0; i < instance_count; ++i) { 237 for (int i = 0; i < instance_count; ++i) {
236 NPP instance = instances_[i]; 238 NPP instance = instances_[i];
237 PluginObject* obj = static_cast<PluginObject*>(instance->pdata); 239 PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
238 240
241 if (obj->drawing_model_ == NPDrawingModelCoreAnimation) {
242 O3DLayer* o3dLayer = static_cast<O3DLayer*>(obj->gl_layer_);
243 if (o3dLayer) {
244 obj->client()->Tick();
245 [o3dLayer setNeedsDisplay];
246 }
247 return;
248 }
249
239 ManageSafariTabSwitching(obj); 250 ManageSafariTabSwitching(obj);
240 obj->client()->Tick(); 251 obj->client()->Tick();
241 252
242 bool in_fullscreen = obj->GetFullscreenMacWindow(); 253 bool in_fullscreen = obj->GetFullscreenMacWindow();
243 254
244 #ifdef O3D_PLUGIN_ENABLE_FULLSCREEN_MSG 255 #ifdef O3D_PLUGIN_ENABLE_FULLSCREEN_MSG
245 if (in_fullscreen) { 256 if (in_fullscreen) {
246 obj->FullscreenIdle(); 257 obj->FullscreenIdle();
247 } 258 }
248 #endif 259 #endif
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 time_to_hide_overlay_ = 0.0; 1079 time_to_hide_overlay_ = 0.0;
1069 o3d::SlideWindowToRect(mac_fullscreen_overlay_window_, 1080 o3d::SlideWindowToRect(mac_fullscreen_overlay_window_,
1070 o3d::Rect2CGRect(o3d::GetOverlayWindowRect(false)), 1081 o3d::Rect2CGRect(o3d::GetOverlayWindowRect(false)),
1071 kTransitionTime); 1082 kTransitionTime);
1072 } 1083 }
1073 } 1084 }
1074 #endif 1085 #endif
1075 1086
1076 } // namespace glue 1087 } // namespace glue
1077 } // namespace o3d 1088 } // namespace o3d
OLDNEW
« no previous file with comments | « plugin/mac/o3d_layer.mm ('k') | plugin/plugin.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698