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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 18346006: Update OS X to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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/app/chrome_main_app_mode_mac.mm ('k') | chrome/browser/metrics/metrics_service.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 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 if (applications.size()) { 1321 if (applications.size()) {
1322 int position = 0; 1322 int position = 0;
1323 NSString* menuStr = 1323 NSString* menuStr =
1324 l10n_util::GetNSStringWithFixup(IDS_BACKGROUND_APPS_MAC); 1324 l10n_util::GetNSStringWithFixup(IDS_BACKGROUND_APPS_MAC);
1325 base::scoped_nsobject<NSMenu> appMenu( 1325 base::scoped_nsobject<NSMenu> appMenu(
1326 [[NSMenu alloc] initWithTitle:menuStr]); 1326 [[NSMenu alloc] initWithTitle:menuStr]);
1327 for (extensions::ExtensionList::const_iterator cursor = 1327 for (extensions::ExtensionList::const_iterator cursor =
1328 applications.begin(); 1328 applications.begin();
1329 cursor != applications.end(); 1329 cursor != applications.end();
1330 ++cursor, ++position) { 1330 ++cursor, ++position) {
1331 DCHECK_EQ(applications.GetPosition(*cursor), position); 1331 DCHECK_EQ(applications.GetPosition(cursor->get()), position);
1332 NSString* itemStr = 1332 NSString* itemStr =
1333 base::SysUTF16ToNSString(UTF8ToUTF16((*cursor)->name())); 1333 base::SysUTF16ToNSString(UTF8ToUTF16((*cursor)->name()));
1334 base::scoped_nsobject<NSMenuItem> appItem( 1334 base::scoped_nsobject<NSMenuItem> appItem(
1335 [[NSMenuItem alloc] initWithTitle:itemStr 1335 [[NSMenuItem alloc] initWithTitle:itemStr
1336 action:@selector(executeApplication:) 1336 action:@selector(executeApplication:)
1337 keyEquivalent:@""]); 1337 keyEquivalent:@""]);
1338 [appItem setTarget:self]; 1338 [appItem setTarget:self];
1339 [appItem setTag:position]; 1339 [appItem setTag:position];
1340 [appMenu addItem:appItem]; 1340 [appMenu addItem:appItem];
1341 } 1341 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 1381
1382 //--------------------------------------------------------------------------- 1382 //---------------------------------------------------------------------------
1383 1383
1384 namespace app_controller_mac { 1384 namespace app_controller_mac {
1385 1385
1386 bool IsOpeningNewWindow() { 1386 bool IsOpeningNewWindow() {
1387 return g_is_opening_new_window; 1387 return g_is_opening_new_window;
1388 } 1388 }
1389 1389
1390 } // namespace app_controller_mac 1390 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « chrome/app/chrome_main_app_mode_mac.mm ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698