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

Unified Diff: base/mac/mac_util.mm

Issue 6046009: Move base/mac_util.h to base/mac and use the base::mac namespace.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/mac/mac_util.h ('k') | base/mac/mac_util_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/mac_util.mm
===================================================================
--- base/mac/mac_util.mm (revision 70351)
+++ base/mac/mac_util.mm (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import <Cocoa/Cocoa.h>
@@ -13,13 +13,14 @@
#include "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
-using base::mac::ScopedCFTypeRef;
+namespace base {
+namespace mac {
namespace {
// a count of currently outstanding requests for full screen mode from browser
// windows, plugins, etc.
-int g_full_screen_requests[mac_util::kNumFullScreenModes] = { 0, 0, 0};
+int g_full_screen_requests[kNumFullScreenModes] = { 0, 0, 0};
// Sets the appropriate SystemUIMode based on the current full screen requests.
// Since only one SystemUIMode can be active at a given time, full screen
@@ -39,12 +40,12 @@
// HideDock.
SystemUIMode desired_mode = kUIModeNormal;
SystemUIOptions desired_options = 0;
- if (g_full_screen_requests[mac_util::kFullScreenModeAutoHideAll] > 0) {
+ if (g_full_screen_requests[kFullScreenModeAutoHideAll] > 0) {
desired_mode = kUIModeAllHidden;
desired_options = kUIOptionAutoShowMenuBar;
- } else if (g_full_screen_requests[mac_util::kFullScreenModeHideDock] > 0) {
+ } else if (g_full_screen_requests[kFullScreenModeHideDock] > 0) {
desired_mode = kUIModeContentHidden;
- } else if (g_full_screen_requests[mac_util::kFullScreenModeHideAll] > 0) {
+ } else if (g_full_screen_requests[kFullScreenModeHideAll] > 0) {
desired_mode = kUIModeAllHidden;
}
@@ -56,16 +57,16 @@
ProcessSerialNumber psn = { 0, kCurrentProcess };
scoped_nsobject<NSDictionary> process_info(
- mac_util::CFToNSCast(ProcessInformationCopyDictionary(&psn,
- kProcessDictionaryIncludeAllInformationMask)));
+ CFToNSCast(ProcessInformationCopyDictionary(&psn,
+ kProcessDictionaryIncludeAllInformationMask)));
long long temp = [[process_info objectForKey:@"ParentPSN"] longLongValue];
ProcessSerialNumber parent_psn =
{ (temp >> 32) & 0x00000000FFFFFFFFLL, temp & 0x00000000FFFFFFFFLL };
scoped_nsobject<NSDictionary> parent_info(
- mac_util::CFToNSCast(ProcessInformationCopyDictionary(&parent_psn,
- kProcessDictionaryIncludeAllInformationMask)));
+ CFToNSCast(ProcessInformationCopyDictionary(&parent_psn,
+ kProcessDictionaryIncludeAllInformationMask)));
// Check that creator process code is that of loginwindow.
BOOL result =
@@ -87,7 +88,7 @@
}
scoped_nsobject<NSArray> login_items_array(
- mac_util::CFToNSCast(LSSharedFileListCopySnapshot(login_items, NULL)));
+ CFToNSCast(LSSharedFileListCopySnapshot(login_items, NULL)));
NSURL* url = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];
@@ -125,10 +126,8 @@
return hidden && hidden == kCFBooleanTrue;
}
-} // end namespace
+} // namespace
-namespace mac_util {
-
std::string PathFromFSRef(const FSRef& ref) {
ScopedCFTypeRef<CFURLRef> url(
CFURLCreateFromFSRef(kCFAllocatorDefault, &ref));
@@ -713,4 +712,5 @@
[nsobj release];
}
-} // namespace mac_util
+} // namespace mac
+} // namespace base
« no previous file with comments | « base/mac/mac_util.h ('k') | base/mac/mac_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698