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

Side by Side Diff: trunk/src/ui/wm/public/scoped_tooltip_disabler.h

Issue 213033002: Revert 259580 "Move wm/public into wm target" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/ui/wm/public/drag_drop_delegate.h ('k') | trunk/src/ui/wm/public/tooltip_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef UI_WM_PUBLIC_SCOPED_TOOLTIP_DISABLER_H_ 5 #ifndef UI_WM_PUBLIC_SCOPED_TOOLTIP_DISABLER_H_
6 #define UI_WM_PUBLIC_SCOPED_TOOLTIP_DISABLER_H_ 6 #define UI_WM_PUBLIC_SCOPED_TOOLTIP_DISABLER_H_
7 7
8 #include "ui/aura/window_observer.h" 8 #include "ui/aura/window_observer.h"
9 #include "ui/wm/wm_export.h"
10 9
11 namespace aura { 10 namespace aura {
12 namespace client { 11 namespace client {
13 12
14 // Use to temporarily disable tooltips. 13 // Use to temporarily disable tooltips.
15 class WM_EXPORT ScopedTooltipDisabler : aura::WindowObserver { 14 class AURA_EXPORT ScopedTooltipDisabler : aura::WindowObserver {
16 public: 15 public:
17 // Disables tooltips on |window| (does nothing if |window| is NULL). Tooltips 16 // Disables tooltips on |window| (does nothing if |window| is NULL). Tooltips
18 // are reenabled from the destructor when there are no most outstanding 17 // are reenabled from the destructor when there are no most outstanding
19 // ScopedTooltipDisablers for |window|. 18 // ScopedTooltipDisablers for |window|.
20 explicit ScopedTooltipDisabler(aura::Window* window); 19 explicit ScopedTooltipDisabler(aura::Window* window);
21 virtual ~ScopedTooltipDisabler(); 20 virtual ~ScopedTooltipDisabler();
22 21
23 private: 22 private:
24 // Reenables the tooltips on the TooltipClient. 23 // Reenables the tooltips on the TooltipClient.
25 void EnableTooltips(); 24 void EnableTooltips();
26 25
27 // aura::WindowObserver: 26 // aura::WindowObserver:
28 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 27 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
29 28
30 // The RootWindow to disable Tooltips on; NULL if the Window passed to the 29 // The RootWindow to disable Tooltips on; NULL if the Window passed to the
31 // constructor was not in a root or the root has been destroyed. 30 // constructor was not in a root or the root has been destroyed.
32 aura::Window* root_; 31 aura::Window* root_;
33 32
34 DISALLOW_COPY_AND_ASSIGN(ScopedTooltipDisabler); 33 DISALLOW_COPY_AND_ASSIGN(ScopedTooltipDisabler);
35 }; 34 };
36 35
37 } // namespace client 36 } // namespace client
38 } // namespace aura 37 } // namespace aura
39 38
40 #endif // UI_WM_PUBLIC_SCOPED_TOOLTIP_DISABLER_H_ 39 #endif // UI_WM_PUBLIC_SCOPED_TOOLTIP_DISABLER_H_
OLDNEW
« no previous file with comments | « trunk/src/ui/wm/public/drag_drop_delegate.h ('k') | trunk/src/ui/wm/public/tooltip_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698