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

Side by Side Diff: content/child/npapi/webplugin_delegate_impl_mac.mm

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | « content/child/npapi/plugin_instance.cc ('k') | content/child/socket_stream_dispatcher.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 #include "content/child/npapi/webplugin_delegate_impl.h" 5 #include "content/child/npapi/webplugin_delegate_impl.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #import <QuartzCore/QuartzCore.h> 8 #import <QuartzCore/QuartzCore.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; 223 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
224 // On dual GPU systems, force the use of the discrete GPU for 224 // On dual GPU systems, force the use of the discrete GPU for
225 // the CARenderer underlying our Core Animation backend for 225 // the CARenderer underlying our Core Animation backend for
226 // all plugins except Flash. For some reason Unity3D's output 226 // all plugins except Flash. For some reason Unity3D's output
227 // doesn't show up if the integrated GPU is used. Safari keeps 227 // doesn't show up if the integrated GPU is used. Safari keeps
228 // even Flash 11 with Stage3D on the integrated GPU, so mirror 228 // even Flash 11 with Stage3D on the integrated GPU, so mirror
229 // that behavior here. 229 // that behavior here.
230 const WebPluginInfo& plugin_info = 230 const WebPluginInfo& plugin_info =
231 instance_->plugin_lib()->plugin_info(); 231 instance_->plugin_lib()->plugin_info();
232 if (plugin_info.name.find(ASCIIToUTF16("Flash")) != 232 if (plugin_info.name.find(base::ASCIIToUTF16("Flash")) !=
233 base::string16::npos) 233 base::string16::npos)
234 gpu_preference = gfx::PreferIntegratedGpu; 234 gpu_preference = gfx::PreferIntegratedGpu;
235 surface_ = plugin_->GetAcceleratedSurface(gpu_preference); 235 surface_ = plugin_->GetAcceleratedSurface(gpu_preference);
236 236
237 // If surface initialization fails for some reason, just continue 237 // If surface initialization fails for some reason, just continue
238 // without any drawing; returning false would be a more confusing user 238 // without any drawing; returning false would be a more confusing user
239 // experience (since it triggers a missing plugin placeholder). 239 // experience (since it triggers a missing plugin placeholder).
240 if (surface_ && surface_->context()) { 240 if (surface_ && surface_->context()) {
241 renderer_ = [[CARenderer rendererWithCGLContext:surface_->context() 241 renderer_ = [[CARenderer rendererWithCGLContext:surface_->context()
242 options:NULL] retain]; 242 options:NULL] retain];
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 window_rect_.width(), window_rect_.height())]; 719 window_rect_.width(), window_rect_.height())];
720 [CATransaction commit]; 720 [CATransaction commit];
721 721
722 [renderer_ setBounds:[layer_ bounds]]; 722 [renderer_ setBounds:[layer_ bounds]];
723 surface_->SetSize(window_rect_.size()); 723 surface_->SetSize(window_rect_.size());
724 // Kick off the drawing timer, if necessary. 724 // Kick off the drawing timer, if necessary.
725 PluginVisibilityChanged(); 725 PluginVisibilityChanged();
726 } 726 }
727 727
728 } // namespace content 728 } // namespace content
OLDNEW
« no previous file with comments | « content/child/npapi/plugin_instance.cc ('k') | content/child/socket_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698