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

Side by Side Diff: chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm

Issue 431473003: Make all views platforms use 'new' (cros-style) wrench menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile errors Created 6 years, 4 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 | « no previous file | chrome/browser/ui/toolbar/wrench_menu_model.h » ('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) 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 #import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h" 5 #import "chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 ui::MenuModel* model = [self recentTabsMenuModel]; 280 ui::MenuModel* model = [self recentTabsMenuModel];
281 if (model) { 281 if (model) {
282 recentTabsMenuModelDelegate_.reset( 282 recentTabsMenuModelDelegate_.reset(
283 new RecentTabsMenuModelDelegate(model, [self recentTabsSubmenu])); 283 new RecentTabsMenuModelDelegate(model, [self recentTabsSubmenu]));
284 } 284 }
285 } 285 }
286 286
287 - (void)createModel { 287 - (void)createModel {
288 recentTabsMenuModelDelegate_.reset(); 288 recentTabsMenuModelDelegate_.reset();
289 wrenchMenuModel_.reset( 289 wrenchMenuModel_.reset(
290 new WrenchMenuModel(acceleratorDelegate_.get(), browser_, false)); 290 new WrenchMenuModel(acceleratorDelegate_.get(), browser_));
291 [self setModel:wrenchMenuModel_.get()]; 291 [self setModel:wrenchMenuModel_.get()];
292 292
293 buttonViewController_.reset( 293 buttonViewController_.reset(
294 [[WrenchMenuButtonViewController alloc] initWithController:self]); 294 [[WrenchMenuButtonViewController alloc] initWithController:self]);
295 [buttonViewController_ view]; 295 [buttonViewController_ view];
296 } 296 }
297 297
298 // Fit the localized strings into the Cut/Copy/Paste control, then resize the 298 // Fit the localized strings into the Cut/Copy/Paste control, then resize the
299 // whole menu item accordingly. 299 // whole menu item accordingly.
300 - (void)adjustPositioning { 300 - (void)adjustPositioning {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 controller_ = controller; 410 controller_ = controller;
411 } 411 }
412 return self; 412 return self;
413 } 413 }
414 414
415 - (IBAction)dispatchWrenchMenuCommand:(id)sender { 415 - (IBAction)dispatchWrenchMenuCommand:(id)sender {
416 [controller_ dispatchWrenchMenuCommand:sender]; 416 [controller_ dispatchWrenchMenuCommand:sender];
417 } 417 }
418 418
419 @end // @implementation WrenchMenuButtonViewController 419 @end // @implementation WrenchMenuButtonViewController
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/wrench_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698