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

Unified Diff: plugin/mac/plugin_mac.mm

Issue 149130: In preparation for becoming an internal plugin in chrome I did these things:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: plugin/mac/plugin_mac.mm
===================================================================
--- plugin/mac/plugin_mac.mm (revision 20106)
+++ plugin/mac/plugin_mac.mm (working copy)
@@ -40,12 +40,19 @@
#include "core/mac/display_window_mac.h"
#include "plugin/mac/graphics_utils_mac.h"
+#if !defined(O3D_INTERNAL_PLUGIN)
BreakpadRef gBreakpadRef = NULL;
+#endif
using glue::_o3d::PluginObject;
using o3d::DisplayWindowMac;
+@interface NSWindowController (plugin_hack)
+- (id)selectedTab;
+@end
+namespace o3d {
+
// Returns the version number of the running Mac browser, as parsed from
// the short version string in the plist of the app's bundle.
bool GetBrowserVersionInfo(int *returned_major,
@@ -104,10 +111,6 @@
// only care whether the value changes or not.
-@interface NSWindowController (plugin_hack)
-- (id)selectedTab;
-@end
-
void ReleaseSafariBrowserWindow(void* browserWindow) {
NSWindow* cocoaWindow = (NSWindow*) browserWindow;
[cocoaWindow release];
@@ -890,13 +893,13 @@
int refresh_rate = 0;
int bpp = 0;
- if (ExtractDisplayModeData([mac_modes objectAtIndex:i],
+ if (o3d::ExtractDisplayModeData([mac_modes objectAtIndex:i],
&width,
&height,
&refresh_rate,
&bpp) && bpp == 32)
modes_found.push_back(o3d::DisplayMode(width, height, refresh_rate,
- i + kO3D_MODE_OFFSET));
+ i + o3d::kO3D_MODE_OFFSET));
}
modes->swap(modes_found);
@@ -949,13 +952,14 @@
mac_fullscreen_state_ = NULL;
}
- SetFullscreenMacWindow(CreateFullscreenWindow(NULL,
- this,
- fullscreen_region_mode_id_));
+ SetFullscreenMacWindow(o3d::CreateFullscreenWindow(
+ NULL,
+ this,
+ fullscreen_region_mode_id_));
Rect bounds = {0,0,0,0};
GetWindowBounds(GetFullscreenMacWindow(), kWindowContentRgn, &bounds);
- SetWindowForAGLContext(mac_agl_context_, GetFullscreenMacWindow());
+ o3d::SetWindowForAGLContext(mac_agl_context_, GetFullscreenMacWindow());
aglDisable(mac_agl_context_, AGL_BUFFER_RECT);
renderer()->SetClientOriginOffset(0, 0);
renderer_->Resize(bounds.right - bounds.left, bounds.bottom - bounds.top);
@@ -963,11 +967,11 @@
fullscreen_ = true;
client()->SendResizeEvent(renderer_->width(), renderer_->height(), true);
- SetFullscreenOverlayMacWindow(CreateOverlayWindow());
+ SetFullscreenOverlayMacWindow(o3d::CreateOverlayWindow());
ShowWindow(mac_fullscreen_overlay_window_);
- SlideWindowToRect(mac_fullscreen_overlay_window_,
- Rect2CGRect(GetOverlayWindowRect(true)),
- kTransitionTime);
+ o3d::SlideWindowToRect(mac_fullscreen_overlay_window_,
+ o3d::Rect2CGRect(o3d::GetOverlayWindowRect(true)),
+ kTransitionTime);
// Hide the overlay text 4 seconds from now.
time_to_hide_overlay_ = [NSDate timeIntervalSinceReferenceDate] + 4.0;
@@ -980,9 +984,9 @@
if (!GetFullscreenMacWindow())
return;
- SetWindowForAGLContext(mac_agl_context_, mac_window_);
+ o3d::SetWindowForAGLContext(mac_agl_context_, mac_window_);
- CleanupFullscreenWindow(this);
+ o3d::CleanupFullscreenWindow(this);
renderer_->Resize(prev_width_, prev_height_);
aglSetInteger(mac_agl_context_, AGL_BUFFER_RECT, last_buffer_rect_);
@@ -1013,9 +1017,10 @@
(time_to_hide_overlay_ != 0.0) &&
(time_to_hide_overlay_ < [NSDate timeIntervalSinceReferenceDate])) {
time_to_hide_overlay_ = 0.0;
- SlideWindowToRect(mac_fullscreen_overlay_window_,
- Rect2CGRect(GetOverlayWindowRect(false)),
- kTransitionTime);
+ o3d::SlideWindowToRect(mac_fullscreen_overlay_window_,
+ o3d::Rect2CGRect(o3d::GetOverlayWindowRect(false)),
+ kTransitionTime);
}
}
+} // namespace o3d
« plugin/mac/main_mac.mm ('K') | « plugin/mac/plugin_mac.h ('k') | plugin/win/config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698