[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / elevation_icon_setter.h
blob5e43e69f9b5cc7d1c90ec5303732f7073d7d75d4
1 // Copyright 2014 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_VIEWS_ELEVATION_ICON_SETTER_H_
6 #define CHROME_BROWSER_UI_VIEWS_ELEVATION_ICON_SETTER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h"
11 class SkBitmap;
13 namespace views {
14 class LabelButton;
17 // On Windows, badges a button with a "UAC shield" icon to indicate that
18 // clicking will trigger a UAC elevation prompt. Does nothing on other
19 // platforms.
20 class ElevationIconSetter {
21 public:
22 // |button| must be guaranteed to be alive throughout this class' lifetime!
23 explicit ElevationIconSetter(views::LabelButton* button);
24 ~ElevationIconSetter();
26 private:
27 void SetButtonIcon(scoped_ptr<SkBitmap> icon);
29 views::LabelButton* button_;
30 base::WeakPtrFactory<ElevationIconSetter> weak_factory_;
32 DISALLOW_COPY_AND_ASSIGN(ElevationIconSetter);
35 #endif // CHROME_BROWSER_UI_VIEWS_ELEVATION_ICON_SETTER_H_