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

Unified Diff: ui/views/window/non_client_view.h

Issue 1733293002: Toggle avatar color when window activation changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert widget observer to direct call Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/widget.cc ('k') | ui/views/window/non_client_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/non_client_view.h
diff --git a/ui/views/window/non_client_view.h b/ui/views/window/non_client_view.h
index d88e762e09259e5aca6ec4f0b3263b23da7fd202..1eac8c29ead65def7368481a52652dbc11da35ce 100644
--- a/ui/views/window/non_client_view.h
+++ b/ui/views/window/non_client_view.h
@@ -84,6 +84,9 @@ class VIEWS_EXPORT NonClientFrameView : public View,
// Whether the widget can be resized or maximized has changed.
virtual void SizeConstraintsChanged() = 0;
+ // The widget's activation state has changed to |active|.
+ virtual void ActivationChanged(bool active);
+
// View:
void GetAccessibleState(ui::AXViewState* state) override;
const char* GetClassName() const override;
@@ -97,6 +100,18 @@ class VIEWS_EXPORT NonClientFrameView : public View,
// View:
void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
+
+ void set_active_state_override(bool* active_state_override) {
+ active_state_override_ = active_state_override;
+ }
+
+ private:
+ // Used to force ShouldPaintAsActive() to treat the active state a particular
+ // way. This is normally null; when non-null, its value will override the
+ // normal "active" value computed by the function.
+ bool* active_state_override_;
+
+ DISALLOW_COPY_AND_ASSIGN(NonClientFrameView);
};
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/views/widget/widget.cc ('k') | ui/views/window/non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698