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

Unified Diff: ui/views/cocoa/tooltip_manager_mac.h

Issue 1137653005: MacViews: Implement Tooltips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: @class ToolTip is not a thing Created 5 years, 7 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/cocoa/tooltip_manager_mac.h
diff --git a/ui/views/cocoa/tooltip_manager_mac.h b/ui/views/cocoa/tooltip_manager_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..735b1e710c851344758cefb2b817ba67260a8e63
--- /dev/null
+++ b/ui/views/cocoa/tooltip_manager_mac.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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_COCOA_TOOLTOP_MANAGER_MAC_H_
+#define UI_VIEWS_COCOA_TOOLTOP_MANAGER_MAC_H_
+
+#include "base/macros.h"
+#include "ui/views/widget/tooltip_manager.h"
+
+namespace views {
+class BridgedNativeWidget;
+
+// Manages native Cocoa tooltips for the given BridgedNativeWidget.
+class TooltipManagerMac : public TooltipManager {
+ public:
+ TooltipManagerMac(BridgedNativeWidget* widget);
Andre 2015/05/13 19:33:13 explicit
tapted 2015/05/15 07:59:55 Done (there's already a presubmit CL for this one
+ ~TooltipManagerMac() override;
+
+ // TooltipManager:
+ int GetMaxWidth(const gfx::Point& location,
+ gfx::NativeView context) const override;
+ const gfx::FontList& GetFontList() const override;
+ void UpdateTooltip() override;
+ void TooltipTextChanged(View* view) override;
+
+ private:
+ BridgedNativeWidget* widget_; // Weak. Owns this.
+
+ DISALLOW_COPY_AND_ASSIGN(TooltipManagerMac);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_COCOA_TOOLTOP_MANAGER_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698