| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/mac/mac_util.h" | 5 #include "base/mac/mac_util.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 #include <sys/utsname.h> | 9 #include <sys/utsname.h> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 desired_mode = kUIModeContentHidden; | 50 desired_mode = kUIModeContentHidden; |
| 51 } else if (g_full_screen_requests[kFullScreenModeHideAll] > 0) { | 51 } else if (g_full_screen_requests[kFullScreenModeHideAll] > 0) { |
| 52 desired_mode = kUIModeAllHidden; | 52 desired_mode = kUIModeAllHidden; |
| 53 } | 53 } |
| 54 | 54 |
| 55 if (current_mode != desired_mode) | 55 if (current_mode != desired_mode) |
| 56 SetSystemUIMode(desired_mode, desired_options); | 56 SetSystemUIMode(desired_mode, desired_options); |
| 57 } | 57 } |
| 58 | 58 |
| 59 // Looks into Shared File Lists corresponding to Login Items for the item | 59 // Looks into Shared File Lists corresponding to Login Items for the item |
| 60 // representing the current application. If such an item is found, returns a | 60 // representing the current application. If such an item is found, returns a |
| 61 // retained reference to it. Caller is responsible for releasing the reference. | 61 // retained reference to it. Caller is responsible for releasing the reference. |
| 62 LSSharedFileListItemRef GetLoginItemForApp() { | 62 LSSharedFileListItemRef GetLoginItemForApp() { |
| 63 ScopedCFTypeRef<LSSharedFileListRef> login_items(LSSharedFileListCreate( | 63 ScopedCFTypeRef<LSSharedFileListRef> login_items(LSSharedFileListCreate( |
| 64 NULL, kLSSharedFileListSessionLoginItems, NULL)); | 64 NULL, kLSSharedFileListSessionLoginItems, NULL)); |
| 65 | 65 |
| 66 if (!login_items.get()) { | 66 if (!login_items.get()) { |
| 67 LOG(ERROR) << "Couldn't get a Login Items list."; | 67 LOG(ERROR) << "Couldn't get a Login Items list."; |
| 68 return NULL; | 68 return NULL; |
| 69 } | 69 } |
| 70 | 70 |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 #endif | 613 #endif |
| 614 | 614 |
| 615 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) | 615 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) |
| 616 bool IsOSLaterThanLion() { | 616 bool IsOSLaterThanLion() { |
| 617 return MacOSXMinorVersion() > LION_MINOR_VERSION; | 617 return MacOSXMinorVersion() > LION_MINOR_VERSION; |
| 618 } | 618 } |
| 619 #endif | 619 #endif |
| 620 | 620 |
| 621 } // namespace mac | 621 } // namespace mac |
| 622 } // namespace base | 622 } // namespace base |
| OLD | NEW |