Add a minor text member to ui::MenuModel.
[chromium-blink-merge.git] / chrome / browser / ui / omnibox / location_bar_util.h
blobe9eb7e93cc2f93dca91ae7f684eb3af08fe06654
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_UTIL_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_UTIL_H_
8 #include "base/strings/string16.h"
9 #include "third_party/skia/include/core/SkColor.h"
11 class ExtensionAction;
13 namespace gfx {
14 class Canvas;
15 class Rect;
18 namespace location_bar_util {
20 // Build a short string to use in keyword-search when the field isn't very big.
21 string16 CalculateMinString(const string16& description);
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);
37 } // namespace location_bar_util
39 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_UTIL_H_