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

Unified Diff: ui/base/models/menu_model.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/models/menu_model.h ('k') | ui/base/models/menu_model_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/models/menu_model.cc
diff --git a/ui/base/models/menu_model.cc b/ui/base/models/menu_model.cc
deleted file mode 100644
index 1b5f6ab0bca072ca7da1cefbbd4b87b9db8d4d2d..0000000000000000000000000000000000000000
--- a/ui/base/models/menu_model.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/base/models/menu_model.h"
-
-namespace ui {
-
-bool MenuModel::IsVisibleAt(int index) const {
- return true;
-}
-
-// static
-bool MenuModel::GetModelAndIndexForCommandId(int command_id,
- MenuModel** model,
- int* index) {
- const int item_count = (*model)->GetItemCount();
- for (int i = 0; i < item_count; ++i) {
- const int candidate_index = i;
- if ((*model)->GetTypeAt(candidate_index) == TYPE_SUBMENU) {
- MenuModel* submenu_model = (*model)->GetSubmenuModelAt(candidate_index);
- if (GetModelAndIndexForCommandId(command_id, &submenu_model, index)) {
- *model = submenu_model;
- return true;
- }
- }
- if ((*model)->GetCommandIdAt(candidate_index) == command_id) {
- *index = candidate_index;
- return true;
- }
- }
- return false;
-}
-
-base::string16 MenuModel::GetSublabelAt(int index) const {
- return base::string16();
-}
-
-base::string16 MenuModel::GetMinorTextAt(int index) const {
- return base::string16();
-}
-
-const gfx::FontList* MenuModel::GetLabelFontListAt(int index) const {
- return NULL;
-}
-
-// Default implementation ignores the event flags.
-void MenuModel::ActivatedAt(int index, int event_flags) {
- ActivatedAt(index);
-}
-
-} // namespace ui
« no previous file with comments | « ui/base/models/menu_model.h ('k') | ui/base/models/menu_model_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698