diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-27 00:11:27 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-27 00:11:27 +0000 |
commit | e9992b14056ca25c961a9c236f85ff5c69f6a839 (patch) | |
tree | 0f75a1b712357a447c3cccccc46e03f3980e884f /ui/views | |
parent | 5f475af49882dcb652fdd36c5b303022e0287b0f (diff) | |
download | chromium_src-e9992b14056ca25c961a9c236f85ff5c69f6a839.zip chromium_src-e9992b14056ca25c961a9c236f85ff5c69f6a839.tar.gz chromium_src-e9992b14056ca25c961a9c236f85ff5c69f6a839.tar.bz2 |
Makes the shelf remain visible while a context menu is showing in the
launcher.
BUG=120301
TEST=see bug
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9860011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r-- | ui/views/controls/menu/menu_runner.cc | 8 | ||||
-rw-r--r-- | ui/views/controls/menu/menu_runner.h | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc index db33ad0..360933f 100644 --- a/ui/views/controls/menu/menu_runner.cc +++ b/ui/views/controls/menu/menu_runner.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// 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. @@ -29,6 +29,8 @@ class MenuRunnerImpl : public internal::MenuControllerDelegate { MenuItemView* menu() { return menu_; } + bool running() const { return running_; } + // See description above class for details. void Release(); @@ -268,6 +270,10 @@ MenuRunner::RunResult MenuRunner::RunMenuAt(Widget* parent, return holder_->RunMenuAt(parent, button, bounds, anchor, types); } +bool MenuRunner::IsRunning() const { + return holder_->running(); +} + void MenuRunner::Cancel() { holder_->Cancel(); } diff --git a/ui/views/controls/menu/menu_runner.h b/ui/views/controls/menu/menu_runner.h index 6a3c572..1fd4370 100644 --- a/ui/views/controls/menu/menu_runner.h +++ b/ui/views/controls/menu/menu_runner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// 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. @@ -85,6 +85,9 @@ class VIEWS_EXPORT MenuRunner { MenuItemView::AnchorPosition anchor, int32 types) WARN_UNUSED_RESULT; + // Returns true if we're in a nested message loop running the menu. + bool IsRunning() const; + // Hides and cancels the menu. This does nothing if the menu is not open. void Cancel(); |