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

Side by Side Diff: ash/shell_unittest.cc

Issue 2140963002: Added default implementations of GetAcceleratorForCommandId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceleratorprovider-const
Patch Set: Rebase. 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 | « ash/shell/context_menu.cc ('k') | ash/sysui/context_menu_mus.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) 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 #include "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/ash_switches.h" 10 #include "ash/common/ash_switches.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 class SimpleMenuDelegate : public ui::SimpleMenuModel::Delegate { 109 class SimpleMenuDelegate : public ui::SimpleMenuModel::Delegate {
110 public: 110 public:
111 SimpleMenuDelegate() {} 111 SimpleMenuDelegate() {}
112 ~SimpleMenuDelegate() override {} 112 ~SimpleMenuDelegate() override {}
113 113
114 bool IsCommandIdChecked(int command_id) const override { return false; } 114 bool IsCommandIdChecked(int command_id) const override { return false; }
115 115
116 bool IsCommandIdEnabled(int command_id) const override { return true; } 116 bool IsCommandIdEnabled(int command_id) const override { return true; }
117 117
118 bool GetAcceleratorForCommandId(int command_id,
119 ui::Accelerator* accelerator) const override {
120 return false;
121 }
122
123 void ExecuteCommand(int command_id, int event_flags) override {} 118 void ExecuteCommand(int command_id, int event_flags) override {}
124 119
125 private: 120 private:
126 DISALLOW_COPY_AND_ASSIGN(SimpleMenuDelegate); 121 DISALLOW_COPY_AND_ASSIGN(SimpleMenuDelegate);
127 }; 122 };
128 123
129 } // namespace 124 } // namespace
130 125
131 class ShellTest : public test::AshTestBase { 126 class ShellTest : public test::AshTestBase {
132 public: 127 public:
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 private: 503 private:
509 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 504 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
510 }; 505 };
511 506
512 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 507 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
513 window_.reset(new aura::Window(NULL)); 508 window_.reset(new aura::Window(NULL));
514 window_->Init(ui::LAYER_NOT_DRAWN); 509 window_->Init(ui::LAYER_NOT_DRAWN);
515 } 510 }
516 511
517 } // namespace ash 512 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/context_menu.cc ('k') | ash/sysui/context_menu_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698