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

Side by Side Diff: ui/base/cocoa/remote_layer_api.mm

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 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
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/base/font_helper_chromeos.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/base/cocoa/remote_layer_api.h" 5 #include "ui/base/cocoa/remote_layer_api.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "ui/base/ui_base_switches.h" 9 #include "ui/base/ui_base_switches.h"
10 10
11 #include <objc/runtime.h> 11 #include <objc/runtime.h>
12 12
13 namespace ui { 13 namespace ui {
14 14
15 bool RemoteLayerAPISupported() { 15 bool RemoteLayerAPISupported() {
16 // This API only works on Mac OS 10.9 and later. 16 // This API only works on Mac OS 10.9 and later.
17 if (!base::mac::IsOSMavericksOrLater()) 17 if (!base::mac::IsOSMavericksOrLater())
18 return false; 18 return false;
19 19
20 bool disabled_at_command_line = 20 bool disabled_at_command_line =
21 CommandLine::ForCurrentProcess()->HasSwitch( 21 base::CommandLine::ForCurrentProcess()->HasSwitch(
22 switches::kDisableRemoteCoreAnimation); 22 switches::kDisableRemoteCoreAnimation);
23 if (disabled_at_command_line) 23 if (disabled_at_command_line)
24 return false; 24 return false;
25 25
26 // Verify the GPU process interfaces are present. 26 // Verify the GPU process interfaces are present.
27 static Class caContextClass = NSClassFromString(@"CAContext"); 27 static Class caContextClass = NSClassFromString(@"CAContext");
28 if (!caContextClass) 28 if (!caContextClass)
29 return false; 29 return false;
30 30
31 // Note that because the contextId and layer properties are dynamic, 31 // Note that because the contextId and layer properties are dynamic,
(...skipping 16 matching lines...) Expand all
48 [caLayerHostClass instancesRespondToSelector:@selector(setContextId:)]; 48 [caLayerHostClass instancesRespondToSelector:@selector(setContextId:)];
49 if (!caLayerHostClassValid) 49 if (!caLayerHostClassValid)
50 return false; 50 return false;
51 51
52 // If everything is there, we should be able to use the API. 52 // If everything is there, we should be able to use the API.
53 return true; 53 return true;
54 } 54 }
55 55
56 } // namespace 56 } // namespace
57 57
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/base/font_helper_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698