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

Unified Diff: ui/views/widget/desktop_aura/scoped_tooltip_client.h

Issue 23477022: Two changes to desktop aura for tooltips: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2013 Created 7 years, 4 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/widget/desktop_aura/scoped_tooltip_client.h
diff --git a/ui/views/widget/desktop_aura/scoped_tooltip_client.h b/ui/views/widget/desktop_aura/scoped_tooltip_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..b707bbc82033461469df37682739ed9a39bdab40
--- /dev/null
+++ b/ui/views/widget/desktop_aura/scoped_tooltip_client.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2013 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.
+
+#ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_SCOPED_TOOLTIP_CLIENT_H_
+#define UI_VIEWS_WIDGET_DESKTOP_AURA_SCOPED_TOOLTIP_CLIENT_H_
+
+#include "base/basictypes.h"
+
+namespace aura {
+class RootWindow;
+}
+
+namespace views {
+
+namespace corewm {
+class TooltipController;
+}
+
+// ScopedTooltipClient is responsible for installing a TooltipClient
+// implementation on a RootWindow. Additionally it ensures only one
+// TooltipController is only ever created. In this way all
+// DesktopNativeWidgetAuras share the same TooltipClient.
+class ScopedTooltipClient {
+ public:
+ explicit ScopedTooltipClient(aura::RootWindow* root_window);
+ ~ScopedTooltipClient();
+
+ private:
+ // Single TooltipController.
+ static corewm::TooltipController* tooltip_controller_;
+
+ // Number of ScopedTooltipClients created.
+ static int scoped_tooltip_client_count_;
+
+ aura::RootWindow* root_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedTooltipClient);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_SCOPED_TOOLTIP_CLIENT_H_
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.cc ('k') | ui/views/widget/desktop_aura/scoped_tooltip_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698