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

Side by Side Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.h

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 years, 9 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "ui/gfx/size.h" 11 #include "ui/gfx/size.h"
(...skipping 19 matching lines...) Expand all
31 IconLabelBubbleView(const int background_images[], 31 IconLabelBubbleView(const int background_images[],
32 int contained_image, 32 int contained_image,
33 const SkColor& color); 33 const SkColor& color);
34 virtual ~IconLabelBubbleView(); 34 virtual ~IconLabelBubbleView();
35 35
36 void SetFont(const gfx::Font& font); 36 void SetFont(const gfx::Font& font);
37 void SetLabel(const std::wstring& label); 37 void SetLabel(const std::wstring& label);
38 void SetImage(const SkBitmap& bitmap); 38 void SetImage(const SkBitmap& bitmap);
39 void SetItemPadding(int padding) { item_padding_ = padding; } 39 void SetItemPadding(int padding) { item_padding_ = padding; }
40 40
41 virtual void OnPaint(gfx::Canvas* canvas); 41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
42 virtual gfx::Size GetPreferredSize(); 42 virtual gfx::Size GetPreferredSize() OVERRIDE;
43 virtual void Layout(); 43 virtual void Layout() OVERRIDE;
44 44
45 protected: 45 protected:
46 void SetElideInMiddle(bool elide_in_middle); 46 void SetElideInMiddle(bool elide_in_middle);
47 gfx::Size GetNonLabelSize(); 47 gfx::Size GetNonLabelSize();
48 48
49 private: 49 private:
50 int GetNonLabelWidth(); 50 int GetNonLabelWidth();
51 51
52 // For painting the background. 52 // For painting the background.
53 views::HorizontalPainter background_painter_; 53 views::HorizontalPainter background_painter_;
54 54
55 // The contents of the bubble. 55 // The contents of the bubble.
56 views::ImageView* image_; 56 views::ImageView* image_;
57 views::Label* label_; 57 views::Label* label_;
58 58
59 int item_padding_; 59 int item_padding_;
60 60
61 DISALLOW_IMPLICIT_CONSTRUCTORS(IconLabelBubbleView); 61 DISALLOW_IMPLICIT_CONSTRUCTORS(IconLabelBubbleView);
62 }; 62 };
63 63
64 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 64 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/ev_bubble_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698