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

Unified Diff: content/shell/shell_mac.mm

Issue 9838071: Implement pepper flash fullscreen on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « content/public/browser/accelerated_window_interface.h ('k') | ui/base/cocoa/fullscreen_window_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_mac.mm
===================================================================
--- content/shell/shell_mac.mm (revision 130181)
+++ content/shell/shell_mac.mm (working copy)
@@ -11,47 +11,13 @@
#import "base/memory/scoped_nsobject.h"
#include "base/string_piece.h"
#include "base/sys_string_conversions.h"
-#import "content/public/browser/accelerated_window_interface.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "content/shell/resource.h"
#include "googleurl/src/gurl.h"
+#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
Avi (use Gerrit) 2012/04/02 20:55:20 Yes!
-@interface ShellWindow : NSWindow<UnderlayableSurface> {
- @private
- int underlaySurfaceCount_;
-}
-
-// Informs the window that an underlay surface has been added/removed. The
-// window is non-opaque while underlay surfaces are present.
-- (void)underlaySurfaceAdded;
-- (void)underlaySurfaceRemoved;
-
-@end
-
-@implementation ShellWindow
-
-- (void)underlaySurfaceAdded {
- DCHECK_GE(underlaySurfaceCount_, 0);
- ++underlaySurfaceCount_;
-
- // We're having the OpenGL surface render under the window, so the window
- // needs to be not opaque.
- if (underlaySurfaceCount_ == 1)
- [self setOpaque:NO];
-}
-
-- (void)underlaySurfaceRemoved {
- --underlaySurfaceCount_;
- DCHECK_GE(underlaySurfaceCount_, 0);
-
- if (underlaySurfaceCount_ == 0)
- [self setOpaque:YES];
-}
-
-@end
-
// Receives notification that the window is closing so that it can start the
// tear-down process. Is responsible for deleting itself when done.
@interface ContentShellWindowDelegate : NSObject<NSWindowDelegate> {
@@ -177,14 +143,14 @@
void Shell::PlatformCreateWindow(int width, int height) {
NSRect initial_window_bounds = NSMakeRect(0, 0, width, height);
- window_ =
- [[ShellWindow alloc] initWithContentRect:initial_window_bounds
- styleMask:(NSTitledWindowMask |
- NSClosableWindowMask |
- NSMiniaturizableWindowMask |
- NSResizableWindowMask )
- backing:NSBackingStoreBuffered
- defer:NO];
+ window_ = [[UnderlayOpenGLHostingWindow alloc]
+ initWithContentRect:initial_window_bounds
+ styleMask:(NSTitledWindowMask |
+ NSClosableWindowMask |
+ NSMiniaturizableWindowMask |
+ NSResizableWindowMask )
+ backing:NSBackingStoreBuffered
+ defer:NO];
[window_ setTitle:kWindowTitle];
NSView* content = [window_ contentView];
« no previous file with comments | « content/public/browser/accelerated_window_interface.h ('k') | ui/base/cocoa/fullscreen_window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698