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

Unified Diff: ui/views/widget/tooltip_manager.h

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | ui/views/widget/tooltip_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/tooltip_manager.h
diff --git a/ui/views/widget/tooltip_manager.h b/ui/views/widget/tooltip_manager.h
index dd148773798e68e5afd9d46662d91470af627d46..105cc5fef392845b2e28eef62156607da80b6329 100644
--- a/ui/views/widget/tooltip_manager.h
+++ b/ui/views/widget/tooltip_manager.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
+#include "ui/gfx/native_widget_types.h"
#include "ui/views/views_export.h"
namespace gfx {
@@ -32,8 +33,9 @@ class VIEWS_EXPORT TooltipManager {
static gfx::Font GetDefaultFont();
// Returns the maximum width of the tooltip. |x| and |y| give the location
- // the tooltip is to be displayed on in screen coordinates.
- static int GetMaxWidth(int x, int y);
+ // the tooltip is to be displayed on in screen coordinates. |context| is
+ // used to determine which gfx::Screen should be used.
+ static int GetMaxWidth(int x, int y, gfx::NativeView context);
TooltipManager() {}
virtual ~TooltipManager() {}
@@ -54,12 +56,14 @@ class VIEWS_EXPORT TooltipManager {
// Trims the tooltip to fit, setting |text| to the clipped result,
// |max_width| to the width (in pixels) of the clipped text and |line_count|
// to the number of lines of text in the tooltip. |x| and |y| give the
- // location of the tooltip in screen coordinates.
+ // location of the tooltip in screen coordinates. |context| is used to
+ // determine which gfx::Screen should be used.
static void TrimTooltipToFit(string16* text,
int* max_width,
int* line_count,
int x,
- int y);
+ int y,
+ gfx::NativeView context);
};
} // namespace views
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | ui/views/widget/tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698