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

Side by Side Diff: ui/views/controls/menu/menu_model_adapter.cc

Issue 1159033008: Refactor ViewsDelegate singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 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
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 "ui/views/controls/menu/menu_model_adapter.h" 5 #include "ui/views/controls/menu/menu_model_adapter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/models/menu_model.h" 8 #include "ui/base/models/menu_model.h"
9 #include "ui/gfx/image/image.h" 9 #include "ui/gfx/image/image.h"
10 #include "ui/views/controls/menu/menu_item_view.h" 10 #include "ui/views/controls/menu/menu_item_view.h"
11 #include "ui/views/controls/menu/submenu_view.h" 11 #include "ui/views/controls/menu/submenu_view.h"
12 #include "ui/views/views_delegate.h"
13 12
14 namespace views { 13 namespace views {
15 14
16 MenuModelAdapter::MenuModelAdapter(ui::MenuModel* menu_model) 15 MenuModelAdapter::MenuModelAdapter(ui::MenuModel* menu_model)
17 : menu_model_(menu_model), 16 : menu_model_(menu_model),
18 triggerable_event_flags_(ui::EF_LEFT_MOUSE_BUTTON | 17 triggerable_event_flags_(ui::EF_LEFT_MOUSE_BUTTON |
19 ui::EF_RIGHT_MOUSE_BUTTON) { 18 ui::EF_RIGHT_MOUSE_BUTTON) {
20 DCHECK(menu_model); 19 DCHECK(menu_model);
21 } 20 }
22 21
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 has_icons = has_icons || item->has_icons(); 283 has_icons = has_icons || item->has_icons();
285 284
286 menu_map_[item] = submodel; 285 menu_map_[item] = submodel;
287 } 286 }
288 } 287 }
289 288
290 menu->set_has_icons(has_icons); 289 menu->set_has_icons(has_icons);
291 } 290 }
292 291
293 } // namespace views 292 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698