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

Side by Side Diff: ui/aura/client/scoped_tooltip_disabler.h

Issue 109403008: Disables showing tooltips while a system menu is showing on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move resetting Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 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 #ifndef UI_AURA_CLIENT_SCOPED_TOOLTIP_DISABLER_H_
6 #define UI_AURA_CLIENT_SCOPED_TOOLTIP_DISABLER_H_
7
8 #include "ui/aura/window_observer.h"
9
10 namespace aura {
11 namespace client {
12
13 // Use to temporarily disable tooltips.
14 class AURA_EXPORT ScopedTooltipDisabler : aura::WindowObserver {
15 public:
16 // Disables tooltips on |window| (does nothing if |window| is NULL). Tooltips
17 // are reenabled from the destructor when there are no most outstanding
18 // ScopedTooltipDisablers for |window|.
19 explicit ScopedTooltipDisabler(aura::Window* window);
20 virtual ~ScopedTooltipDisabler();
21
22 private:
23 // Reenables the tooltips on the TooltipClient.
24 void EnableTooltips();
25
26 // aura::WindowObserver:
27 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
28
29 // The RootWindow to disable Tooltips on; NULL if the Window passed to the
30 // constructor was not in a root or the root has been destroyed.
31 aura::Window* root_;
32
33 DISALLOW_COPY_AND_ASSIGN(ScopedTooltipDisabler);
34 };
35
36 } // namespace client
37 } // namespace aura
38
39 #endif // UI_AURA_CLIENT_SCOPED_TOOLTIP_DISABLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698