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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_button.cc

Issue 1566693002: Moved parent_->SchedulePaint() to Views::SetFillsBoundsOpaquely() and Views::SchedulePaint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 void ToolbarButton::AddInkDropLayer(ui::Layer* ink_drop_layer) { 187 void ToolbarButton::AddInkDropLayer(ui::Layer* ink_drop_layer) {
188 SetPaintToLayer(true); 188 SetPaintToLayer(true);
189 SetFillsBoundsOpaquely(false); 189 SetFillsBoundsOpaquely(false);
190 image()->SetPaintToLayer(true); 190 image()->SetPaintToLayer(true);
191 image()->SetFillsBoundsOpaquely(false); 191 image()->SetFillsBoundsOpaquely(false);
192 192
193 layer()->Add(ink_drop_layer); 193 layer()->Add(ink_drop_layer);
194 layer()->StackAtBottom(ink_drop_layer); 194 layer()->StackAtBottom(ink_drop_layer);
195
196 // Invalidates the contents of the parent's layer which may contain
197 // a stale close/reload icon that should not remain visible.
198 parent()->SchedulePaint();
199 } 195 }
200 196
201 void ToolbarButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { 197 void ToolbarButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
202 layer()->Remove(ink_drop_layer); 198 layer()->Remove(ink_drop_layer);
203 199
204 image()->SetFillsBoundsOpaquely(true); 200 image()->SetFillsBoundsOpaquely(true);
205 image()->SetPaintToLayer(false); 201 image()->SetPaintToLayer(false);
206 SetPaintToLayer(false); 202 SetPaintToLayer(false);
207 } 203 }
208 204
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 SetState(STATE_NORMAL); 295 SetState(STATE_NORMAL);
300 } 296 }
301 297
302 const char* ToolbarButton::GetClassName() const { 298 const char* ToolbarButton::GetClassName() const {
303 return "ToolbarButton"; 299 return "ToolbarButton";
304 } 300 }
305 301
306 gfx::Point ToolbarButton::CalculateInkDropCenter() const { 302 gfx::Point ToolbarButton::CalculateInkDropCenter() const {
307 return GetLocalBounds().CenterPoint(); 303 return GetLocalBounds().CenterPoint();
308 } 304 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698