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

Side by Side Diff: content/plugin/webplugin_accelerated_surface_proxy_mac.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « content/plugin/plugin_thread.cc ('k') | content/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import <OpenGL/OpenGL.h> 5 #import <OpenGL/OpenGL.h>
6 6
7 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h" 7 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "content/plugin/webplugin_proxy.h" 11 #include "content/plugin/webplugin_proxy.h"
12 #include "content/public/common/content_switches.h" 12 #include "content/public/common/content_switches.h"
13 #include "ui/surface/accelerated_surface_mac.h" 13 #include "ui/surface/accelerated_surface_mac.h"
14 #include "ui/surface/transport_dib.h" 14 #include "ui/surface/transport_dib.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 WebPluginAcceleratedSurfaceProxy* WebPluginAcceleratedSurfaceProxy::Create( 18 WebPluginAcceleratedSurfaceProxy* WebPluginAcceleratedSurfaceProxy::Create(
19 WebPluginProxy* plugin_proxy, 19 WebPluginProxy* plugin_proxy,
20 gfx::GpuPreference gpu_preference) { 20 gfx::GpuPreference gpu_preference) {
21 // This code path shouldn't be taken if CA plugins are disabled 21 // This code path shouldn't be taken if CA plugins are disabled
22 // because the CA drawing model shouldn't be advertised. 22 // because the CA drawing model shouldn't be advertised.
23 DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch( 23 DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
24 switches::kDisableCoreAnimationPlugins)); 24 switches::kDisableCoreAnimationPlugins));
25 25
26 AcceleratedSurface* surface = new AcceleratedSurface; 26 AcceleratedSurface* surface = new AcceleratedSurface;
27 // It's possible for OpenGL to fail to initialize (e.g., if an incompatible 27 // It's possible for OpenGL to fail to initialize (e.g., if an incompatible
28 // mode is forced via flags), so handle that gracefully. 28 // mode is forced via flags), so handle that gracefully.
29 if (!surface->Initialize(NULL, true, gpu_preference)) { 29 if (!surface->Initialize(NULL, true, gpu_preference)) {
30 delete surface; 30 delete surface;
31 return NULL; 31 return NULL;
32 } 32 }
33 33
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 void WebPluginAcceleratedSurfaceProxy::EndDrawing() { 74 void WebPluginAcceleratedSurfaceProxy::EndDrawing() {
75 if (!surface_) 75 if (!surface_)
76 return; 76 return;
77 77
78 surface_->SwapBuffers(); 78 surface_->SwapBuffers();
79 plugin_proxy_->AcceleratedPluginSwappedIOSurface(); 79 plugin_proxy_->AcceleratedPluginSwappedIOSurface();
80 } 80 }
81 81
82 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/plugin_thread.cc ('k') | content/plugin/webplugin_delegate_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698