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

Side by Side Diff: ash/utility/partial_screenshot_controller.cc

Issue 817393002: Standardize usage of virtual/override/final specifiers in ash/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | ash/wm/always_on_top_controller_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 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 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 "ash/utility/partial_screenshot_controller.h" 5 #include "ash/utility/partial_screenshot_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/screenshot_delegate.h" 9 #include "ash/screenshot_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 22 matching lines...) Expand all
33 public: 33 public:
34 PartialScreenshotLayer(ui::Layer* parent) { 34 PartialScreenshotLayer(ui::Layer* parent) {
35 SetLayer(new ui::Layer(ui::LAYER_TEXTURED)); 35 SetLayer(new ui::Layer(ui::LAYER_TEXTURED));
36 layer()->SetFillsBoundsOpaquely(false); 36 layer()->SetFillsBoundsOpaquely(false);
37 layer()->SetBounds(parent->bounds()); 37 layer()->SetBounds(parent->bounds());
38 parent->Add(layer()); 38 parent->Add(layer());
39 parent->StackAtTop(layer()); 39 parent->StackAtTop(layer());
40 layer()->SetVisible(true); 40 layer()->SetVisible(true);
41 layer()->set_delegate(this); 41 layer()->set_delegate(this);
42 } 42 }
43 ~PartialScreenshotLayer() {} 43 ~PartialScreenshotLayer() override {}
44 44
45 const gfx::Rect& region() const { return region_; } 45 const gfx::Rect& region() const { return region_; }
46 46
47 void SetRegion(const gfx::Rect& region) { 47 void SetRegion(const gfx::Rect& region) {
48 // Invalidates the region which covers the current and new region. 48 // Invalidates the region which covers the current and new region.
49 gfx::Rect union_rect(region_); 49 gfx::Rect union_rect(region_);
50 union_rect.Union(region); 50 union_rect.Union(region);
51 union_rect.Inset(-kInvalidateRegionAdditionalSize, 51 union_rect.Inset(-kInvalidateRegionAdditionalSize,
52 -kInvalidateRegionAdditionalSize); 52 -kInvalidateRegionAdditionalSize);
53 union_rect.Intersects(layer()->bounds()); 53 union_rect.Intersects(layer()->bounds());
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 const gfx::Display& old_display) { 257 const gfx::Display& old_display) {
258 Cancel(); 258 Cancel();
259 } 259 }
260 260
261 void PartialScreenshotController::OnDisplayMetricsChanged( 261 void PartialScreenshotController::OnDisplayMetricsChanged(
262 const gfx::Display& display, 262 const gfx::Display& display,
263 uint32_t changed_metrics) { 263 uint32_t changed_metrics) {
264 } 264 }
265 265
266 } // namespace ash 266 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/always_on_top_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698