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

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

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/window/non_client_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/non_client_view.cc
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc
index 1a2a2c8295ee81addc487cfd38aeccf4ec3c09ac..0718c2c2aee36ef114ade8027bdb79dd39374875 100644
--- a/ui/views/window/non_client_view.cc
+++ b/ui/views/window/non_client_view.cc
@@ -34,8 +34,8 @@ static const int kClientViewIndex = 1;
// NonClientView, public:
NonClientView::NonClientView()
- : client_view_(NULL),
- overlay_view_(NULL) {
+ : client_view_(nullptr),
+ overlay_view_(nullptr) {
SetEventTargeter(
scoped_ptr<views::ViewTargeter>(new views::ViewTargeter(this)));
}
@@ -241,7 +241,9 @@ NonClientFrameView::~NonClientFrameView() {
}
bool NonClientFrameView::ShouldPaintAsActive() const {
- return GetWidget()->IsAlwaysRenderAsActive() || GetWidget()->IsActive();
+ return GetWidget()->IsAlwaysRenderAsActive() ||
+ (active_state_override_ ? *active_state_override_
+ : GetWidget()->IsActive());
}
int NonClientFrameView::GetHTComponentForFrame(const gfx::Point& point,
@@ -293,6 +295,9 @@ int NonClientFrameView::GetHTComponentForFrame(const gfx::Point& point,
return can_resize ? component : HTBORDER;
}
+void NonClientFrameView::ActivationChanged(bool active) {
+}
+
void NonClientFrameView::GetAccessibleState(ui::AXViewState* state) {
state->role = ui::AX_ROLE_CLIENT;
}
@@ -304,7 +309,8 @@ const char* NonClientFrameView::GetClassName() const {
////////////////////////////////////////////////////////////////////////////////
// NonClientFrameView, protected:
-NonClientFrameView::NonClientFrameView() {
+NonClientFrameView::NonClientFrameView()
+ : active_state_override_(nullptr) {
SetEventTargeter(
scoped_ptr<views::ViewTargeter>(new views::ViewTargeter(this)));
}
« no previous file with comments | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698