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

Side by Side Diff: ash/wm/resize_shadow.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « ash/wm/resize_shadow.h ('k') | ash/wm/resize_shadow_and_cursor_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wm/resize_shadow.h" 5 #include "ash/wm/resize_shadow.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "grit/ash_resources.h" 8 #include "grit/ash_resources.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/base/hit_test.h" 10 #include "ui/base/hit_test.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ResizeShadow::~ResizeShadow() {} 46 ResizeShadow::~ResizeShadow() {}
47 47
48 void ResizeShadow::Init(aura::Window* window) { 48 void ResizeShadow::Init(aura::Window* window) {
49 // Set up our image grid and images. 49 // Set up our image grid and images.
50 ResourceBundle& res = ResourceBundle::GetSharedInstance(); 50 ResourceBundle& res = ResourceBundle::GetSharedInstance();
51 image_grid_.reset(new ::wm::ImageGrid); 51 image_grid_.reset(new ::wm::ImageGrid);
52 image_grid_->SetImages( 52 image_grid_->SetImages(
53 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP_LEFT), 53 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP_LEFT),
54 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP), 54 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP),
55 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP_RIGHT), 55 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_TOP_RIGHT),
56 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_LEFT), 56 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_LEFT), NULL,
57 NULL,
58 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_RIGHT), 57 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_RIGHT),
59 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM_LEFT), 58 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM_LEFT),
60 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM), 59 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM),
61 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM_RIGHT)); 60 &res.GetImageNamed(IDR_AURA_RESIZE_SHADOW_BOTTOM_RIGHT));
62 // Initialize all layers to invisible/transparent. 61 // Initialize all layers to invisible/transparent.
63 InitLayer(image_grid_->top_left_layer()); 62 InitLayer(image_grid_->top_left_layer());
64 InitLayer(image_grid_->top_layer()); 63 InitLayer(image_grid_->top_layer());
65 InitLayer(image_grid_->top_right_layer()); 64 InitLayer(image_grid_->top_right_layer());
66 InitLayer(image_grid_->left_layer()); 65 InitLayer(image_grid_->left_layer());
67 InitLayer(image_grid_->right_layer()); 66 InitLayer(image_grid_->right_layer());
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void ResizeShadow::Hide() { 98 void ResizeShadow::Hide() {
100 ShowForHitTest(HTNOWHERE); 99 ShowForHitTest(HTNOWHERE);
101 } 100 }
102 101
103 void ResizeShadow::Layout(const gfx::Rect& content_bounds) { 102 void ResizeShadow::Layout(const gfx::Rect& content_bounds) {
104 gfx::Rect local_bounds(content_bounds.size()); 103 gfx::Rect local_bounds(content_bounds.size());
105 image_grid_->SetContentBounds(local_bounds); 104 image_grid_->SetContentBounds(local_bounds);
106 } 105 }
107 106
108 } // namespace ash 107 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/resize_shadow.h ('k') | ash/wm/resize_shadow_and_cursor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698