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

Unified Diff: chrome/browser/ui/views/elevation_icon_setter.h

Issue 941133002: Update global error bubble view's boundary (position and size) after loading elevation icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | chrome/browser/ui/views/elevation_icon_setter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/elevation_icon_setter.h
diff --git a/chrome/browser/ui/views/elevation_icon_setter.h b/chrome/browser/ui/views/elevation_icon_setter.h
index 5e43e69f9b5cc7d1c90ec5303732f7073d7d75d4..7cb5c4d0a78dd3a9db89cc70bbaac638f28e0902 100644
--- a/chrome/browser/ui/views/elevation_icon_setter.h
+++ b/chrome/browser/ui/views/elevation_icon_setter.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_UI_VIEWS_ELEVATION_ICON_SETTER_H_
#define CHROME_BROWSER_UI_VIEWS_ELEVATION_ICON_SETTER_H_
+#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -20,11 +21,15 @@ class LabelButton;
class ElevationIconSetter {
public:
// |button| must be guaranteed to be alive throughout this class' lifetime!
- explicit ElevationIconSetter(views::LabelButton* button);
+ // |callback| will be called if the button icon is actually changed; callers
+ // should pass a function which does a relayout on the view containing the
+ // button, to ensure the button is correctly resized as necessary.
+ ElevationIconSetter(views::LabelButton* button,
+ const base::Closure& callback);
~ElevationIconSetter();
private:
- void SetButtonIcon(scoped_ptr<SkBitmap> icon);
+ void SetButtonIcon(const base::Closure& callback, scoped_ptr<SkBitmap> icon);
views::LabelButton* button_;
base::WeakPtrFactory<ElevationIconSetter> weak_factory_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/elevation_icon_setter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698