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

Side by Side Diff: content/browser/renderer_host/accelerated_plugin_view_mac.h

Issue 10804031: Move more files into the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
6 #define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H 6 #define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
11 #include "base/memory/scoped_nsobject.h" 11 #include "base/memory/scoped_nsobject.h"
12 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
13 13
14 namespace content {
14 class RenderWidgetHostViewMac; 15 class RenderWidgetHostViewMac;
16 }
15 17
16 // This subclass of NSView hosts the output of accelerated plugins on 18 // This subclass of NSView hosts the output of accelerated plugins on
17 // the page. 19 // the page.
18 @interface AcceleratedPluginView : NSView { 20 @interface AcceleratedPluginView : NSView {
19 scoped_nsobject<NSOpenGLPixelFormat> glPixelFormat_; 21 scoped_nsobject<NSOpenGLPixelFormat> glPixelFormat_;
20 CGLPixelFormatObj cglPixelFormat_; // weak, backed by |glPixelFormat_|. 22 CGLPixelFormatObj cglPixelFormat_; // weak, backed by |glPixelFormat_|.
21 scoped_nsobject<NSOpenGLContext> glContext_; 23 scoped_nsobject<NSOpenGLContext> glContext_;
22 CGLContextObj cglContext_; // weak, backed by |glContext_|. 24 CGLContextObj cglContext_; // weak, backed by |glContext_|.
23 25
24 RenderWidgetHostViewMac* renderWidgetHostView_; // weak 26 content::RenderWidgetHostViewMac* renderWidgetHostView_; // weak
25 gfx::PluginWindowHandle pluginHandle_; // weak 27 gfx::PluginWindowHandle pluginHandle_; // weak
26 28
27 // Rects that should show web content rather than plugin content. 29 // Rects that should show web content rather than plugin content.
28 scoped_nsobject<NSArray> cutoutRects_; 30 scoped_nsobject<NSArray> cutoutRects_;
29 31
30 BOOL handlingGlobalFrameDidChange_; 32 BOOL handlingGlobalFrameDidChange_;
31 } 33 }
32 34
33 - (id)initWithRenderWidgetHostViewMac:(RenderWidgetHostViewMac*)r 35 - (id)initWithRenderWidgetHostViewMac:(content::RenderWidgetHostViewMac*)r
34 pluginHandle:(gfx::PluginWindowHandle)pluginHandle; 36 pluginHandle:(gfx::PluginWindowHandle)pluginHandle;
35 37
36 // Sets the list of rectangles that should show the web page, rather than the 38 // Sets the list of rectangles that should show the web page, rather than the
37 // accelerated plugin. This is used to simulate the iframe-based trick that web 39 // accelerated plugin. This is used to simulate the iframe-based trick that web
38 // pages have long used to show web content above windowed plugins on Windows 40 // pages have long used to show web content above windowed plugins on Windows
39 // and Linux. 41 // and Linux.
40 - (void)setCutoutRects:(NSArray*)cutout_rects; 42 - (void)setCutoutRects:(NSArray*)cutout_rects;
41 43
42 // NSViews autorelease subviews when they die. The RWHVMac gets destroyed when 44 // NSViews autorelease subviews when they die. The RWHVMac gets destroyed when
43 // RHWVCocoa gets dealloc'd, which means the AcceleratedPluginView child views 45 // RHWVCocoa gets dealloc'd, which means the AcceleratedPluginView child views
44 // can be around a little longer than the RWHVMac. This is called when the 46 // can be around a little longer than the RWHVMac. This is called when the
45 // RWHVMac is about to be deleted (but it's still valid while this method runs). 47 // RWHVMac is about to be deleted (but it's still valid while this method runs).
46 - (void)onRenderWidgetHostViewGone; 48 - (void)onRenderWidgetHostViewGone;
47 49
48 // Draw the view from the UI thread. 50 // Draw the view from the UI thread.
49 - (void)drawView; 51 - (void)drawView;
50 52
51 @end 53 @end
52 54
53 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H 55 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/accelerated_plugin_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698