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

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

Issue 331993009: MacViews: Run native Cocoa context menus to support Services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to master Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/views/controls/menu/menu_runner_impl_adapter.h"
6
7 #include "ui/views/controls/menu/menu_model_adapter.h"
8 #include "ui/views/controls/menu/menu_runner_impl.h"
9
10 namespace views {
11 namespace internal {
12
13 MenuRunnerImplAdapter::MenuRunnerImplAdapter(ui::MenuModel* menu_model)
14 : menu_model_adapter_(new MenuModelAdapter(menu_model)),
15 impl_(new MenuRunnerImpl(menu_model_adapter_->CreateMenu())) {
16 }
17
18 bool MenuRunnerImplAdapter::IsRunning() const {
19 return impl_->IsRunning();
20 }
21
22 void MenuRunnerImplAdapter::Release() {
23 impl_->Release();
24 delete this;
25 }
26
27 MenuRunner::RunResult MenuRunnerImplAdapter::RunMenuAt(
28 Widget* parent,
29 MenuButton* button,
30 const gfx::Rect& bounds,
31 MenuAnchorPosition anchor,
32 int32 types) {
33 return impl_->RunMenuAt(parent, button, bounds, anchor, types);
34 }
35
36 void MenuRunnerImplAdapter::Cancel() {
37 impl_->Cancel();
38 }
39
40 base::TimeDelta MenuRunnerImplAdapter::GetClosingEventTime() const {
41 return impl_->GetClosingEventTime();
42 }
43
44 MenuRunnerImplAdapter::~MenuRunnerImplAdapter() {
45 }
46
47 } // namespace internal
48 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_runner_impl_adapter.h ('k') | ui/views/controls/menu/menu_runner_impl_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698