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

Side by Side Diff: chrome/browser/ui/cocoa/tab_view.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, 11 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 | « chrome/browser/ui/cocoa/tab_strip_view.mm ('k') | chrome/browser/ui/cocoa/tabpose_window.mm » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/ui/cocoa/tab_view.h" 5 #import "chrome/browser/ui/cocoa/tab_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac_util.h" 8 #import "base/mac/mac_util.h"
9 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
10 #include "chrome/browser/accessibility/browser_accessibility_state.h" 10 #include "chrome/browser/accessibility/browser_accessibility_state.h"
11 #include "chrome/browser/themes/browser_theme_provider.h" 11 #include "chrome/browser/themes/browser_theme_provider.h"
12 #import "chrome/browser/ui/cocoa/tab_controller.h" 12 #import "chrome/browser/ui/cocoa/tab_controller.h"
13 #import "chrome/browser/ui/cocoa/tab_window_controller.h" 13 #import "chrome/browser/ui/cocoa/tab_window_controller.h"
14 #import "chrome/browser/ui/cocoa/themed_window.h" 14 #import "chrome/browser/ui/cocoa/themed_window.h"
15 #import "chrome/browser/ui/cocoa/view_id_util.h" 15 #import "chrome/browser/ui/cocoa/view_id_util.h"
16 #include "grit/theme_resources.h" 16 #include "grit/theme_resources.h"
17 17
18 namespace { 18 namespace {
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 NULL, reinterpret_cast<const void **>(&windowID), 1, NULL)); 981 NULL, reinterpret_cast<const void **>(&windowID), 1, NULL));
982 base::mac::ScopedCFTypeRef<CFArrayRef> descriptions( 982 base::mac::ScopedCFTypeRef<CFArrayRef> descriptions(
983 CGWindowListCreateDescriptionFromArray(windowIDs)); 983 CGWindowListCreateDescriptionFromArray(windowIDs));
984 DCHECK(CFArrayGetCount(descriptions.get()) <= 1); 984 DCHECK(CFArrayGetCount(descriptions.get()) <= 1);
985 if (CFArrayGetCount(descriptions.get()) > 0) { 985 if (CFArrayGetCount(descriptions.get()) > 0) {
986 CFDictionaryRef dict = static_cast<CFDictionaryRef>( 986 CFDictionaryRef dict = static_cast<CFDictionaryRef>(
987 CFArrayGetValueAtIndex(descriptions.get(), 0)); 987 CFArrayGetValueAtIndex(descriptions.get(), 0));
988 DCHECK(CFGetTypeID(dict) == CFDictionaryGetTypeID()); 988 DCHECK(CFGetTypeID(dict) == CFDictionaryGetTypeID());
989 989
990 // Sanity check the ID. 990 // Sanity check the ID.
991 CFNumberRef otherIDRef = (CFNumberRef)mac_util::GetValueFromDictionary( 991 CFNumberRef otherIDRef = (CFNumberRef)base::mac::GetValueFromDictionary(
992 dict, kCGWindowNumber, CFNumberGetTypeID()); 992 dict, kCGWindowNumber, CFNumberGetTypeID());
993 CGWindowID otherID; 993 CGWindowID otherID;
994 if (otherIDRef && 994 if (otherIDRef &&
995 CFNumberGetValue(otherIDRef, kCGWindowIDCFNumberType, &otherID) && 995 CFNumberGetValue(otherIDRef, kCGWindowIDCFNumberType, &otherID) &&
996 otherID == windowID) { 996 otherID == windowID) {
997 // And then get the workspace. 997 // And then get the workspace.
998 CFNumberRef workspaceRef = (CFNumberRef)mac_util::GetValueFromDictionary( 998 CFNumberRef workspaceRef = (CFNumberRef)base::mac::GetValueFromDictionary(
999 dict, kCGWindowWorkspace, CFNumberGetTypeID()); 999 dict, kCGWindowWorkspace, CFNumberGetTypeID());
1000 if (!workspaceRef || 1000 if (!workspaceRef ||
1001 !CFNumberGetValue(workspaceRef, kCFNumberIntType, &workspace)) { 1001 !CFNumberGetValue(workspaceRef, kCFNumberIntType, &workspace)) {
1002 workspace = -1; 1002 workspace = -1;
1003 } 1003 }
1004 } else { 1004 } else {
1005 NOTREACHED(); 1005 NOTREACHED();
1006 } 1006 }
1007 } 1007 }
1008 if (useCache) { 1008 if (useCache) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 controlPoint1:NSMakePoint(topRight.x + bottomControlPointInset, 1047 controlPoint1:NSMakePoint(topRight.x + bottomControlPointInset,
1048 topRight.y) 1048 topRight.y)
1049 controlPoint2:NSMakePoint(bottomRight.x - baseControlPointOutset, 1049 controlPoint2:NSMakePoint(bottomRight.x - baseControlPointOutset,
1050 bottomRight.y)]; 1050 bottomRight.y)];
1051 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y)]; 1051 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y)];
1052 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y - 2)]; 1052 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y - 2)];
1053 return path; 1053 return path;
1054 } 1054 }
1055 1055
1056 @end // @implementation TabView(Private) 1056 @end // @implementation TabView(Private)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_strip_view.mm ('k') | chrome/browser/ui/cocoa/tabpose_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698