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

Side by Side Diff: ui/base/cocoa/menu_controller_unittest.mm

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 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
« no previous file with comments | « ui/base/accelerators/accelerator.h ('k') | ui/base/models/button_menu_item_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 28 matching lines...) Expand all
39 did_show_(false), 39 did_show_(false),
40 did_close_(false) { 40 did_close_(false) {
41 } 41 }
42 42
43 bool IsCommandIdChecked(int command_id) const override { return false; } 43 bool IsCommandIdChecked(int command_id) const override { return false; }
44 bool IsCommandIdEnabled(int command_id) const override { 44 bool IsCommandIdEnabled(int command_id) const override {
45 ++enable_count_; 45 ++enable_count_;
46 return true; 46 return true;
47 } 47 }
48 bool GetAcceleratorForCommandId(int command_id, 48 bool GetAcceleratorForCommandId(int command_id,
49 Accelerator* accelerator) override { 49 Accelerator* accelerator) const override {
50 return false; 50 return false;
51 } 51 }
52 void ExecuteCommand(int command_id, int event_flags) override { 52 void ExecuteCommand(int command_id, int event_flags) override {
53 ++execute_count_; 53 ++execute_count_;
54 } 54 }
55 55
56 void MenuWillShow(SimpleMenuModel* /*source*/) override { 56 void MenuWillShow(SimpleMenuModel* /*source*/) override {
57 EXPECT_FALSE(did_show_); 57 EXPECT_FALSE(did_show_);
58 EXPECT_FALSE(did_close_); 58 EXPECT_FALSE(did_close_);
59 did_show_ = true; 59 did_show_ = true;
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // Pump the task that notifies the delegate. 392 // Pump the task that notifies the delegate.
393 message_loop.RunUntilIdle(); 393 message_loop.RunUntilIdle();
394 394
395 // Expect that the delegate got notified properly. 395 // Expect that the delegate got notified properly.
396 EXPECT_TRUE(delegate.did_close_); 396 EXPECT_TRUE(delegate.did_close_);
397 } 397 }
398 398
399 } // namespace 399 } // namespace
400 400
401 } // namespace ui 401 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/accelerators/accelerator.h ('k') | ui/base/models/button_menu_item_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698