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

Side by Side Diff: chrome/browser/ui/omnibox/location_bar_util.h

Issue 10834279: Give request-to-act badges a grey background, and increase spacing to make it fit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Call the right superclass method Created 8 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_OMNIBOX_LOCATION_BAR_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_UTIL_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_UTIL_H_ 6 #define CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_UTIL_H_
7 7
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "third_party/skia/include/core/SkColor.h"
10
11 class ExtensionAction;
12
13 namespace gfx {
14 class Canvas;
15 class Rect;
16 }
9 17
10 namespace location_bar_util { 18 namespace location_bar_util {
11 19
12 // Build a short string to use in keyword-search when the field isn't very big. 20 // Build a short string to use in keyword-search when the field isn't very big.
13 string16 CalculateMinString(const string16& description); 21 string16 CalculateMinString(const string16& description);
14 22
23 // Paint the background and border for |action| on |tab_id|. |bounds| should
24 // include the top and bottom of the location bar, and the middle column
25 // exactly between two ExtensionActions, so both ExtensionActions can draw on
26 // it. This background is only drawn for script badges in the WANTS_ATTENTION
27 // state, and (when text is black and the background is white) consists of a
28 // dark grey, 1px border and a lighter grey background with a slight vertical
29 // gradient.
30 void PaintExtensionActionBackground(const ExtensionAction& action,
31 int tab_id,
32 gfx::Canvas* canvas,
33 const gfx::Rect& bounds,
34 SkColor text_color,
35 SkColor background_color);
36
15 } // namespace location_bar_util 37 } // namespace location_bar_util
16 38
17 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_UTIL_H_ 39 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/omnibox/location_bar_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698