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

Unified Diff: ui/views/controls/menu/menu_2.cc

Issue 14150005: views: Finally get rid of the deprecated Menu2 API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
Index: ui/views/controls/menu/menu_2.cc
diff --git a/ui/views/controls/menu/menu_2.cc b/ui/views/controls/menu/menu_2.cc
deleted file mode 100644
index c421a79c54435d4b28674a9540f956febca5a2c3..0000000000000000000000000000000000000000
--- a/ui/views/controls/menu/menu_2.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 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/views/controls/menu/menu_2.h"
-
-#include "ui/base/models/menu_model.h"
-#include "ui/views/controls/menu/menu_listener.h"
-
-namespace views {
-
-Menu2::Menu2(ui::MenuModel* model)
- : model_(model),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- wrapper_(MenuWrapper::CreateWrapper(model))) {
- Rebuild();
-}
-
-Menu2::~Menu2() {}
-
-HMENU Menu2::GetNativeMenu() const {
- return wrapper_->GetNativeMenu();
-}
-
-void Menu2::RunMenuAt(const gfx::Point& point, Alignment alignment) {
- wrapper_->RunMenuAt(point, alignment);
-}
-
-void Menu2::RunContextMenuAt(const gfx::Point& point) {
- RunMenuAt(point, ALIGN_TOPLEFT);
-}
-
-void Menu2::CancelMenu() {
- wrapper_->CancelMenu();
-}
-
-void Menu2::Rebuild() {
- wrapper_->Rebuild(NULL);
-}
-
-void Menu2::UpdateStates() {
- wrapper_->UpdateStates();
-}
-
-MenuWrapper::MenuAction Menu2::GetMenuAction() const {
- return wrapper_->GetMenuAction();
-}
-
-void Menu2::AddMenuListener(MenuListener* listener) {
- wrapper_->AddMenuListener(listener);
-}
-
-void Menu2::RemoveMenuListener(MenuListener* listener) {
- wrapper_->RemoveMenuListener(listener);
-}
-
-void Menu2::SetMinimumWidth(int width) {
- wrapper_->SetMinimumWidth(width);
-}
-
-} // namespace

Powered by Google App Engine
This is Rietveld 408576698