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

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

Issue 16968003: Rewrite scoped_ptr<T>(NULL) to use the default ctor in ash/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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/frame_painter.h" 5 #include "ash/wm/frame_painter.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 top_edge_(NULL), 223 top_edge_(NULL),
224 top_right_corner_(NULL), 224 top_right_corner_(NULL),
225 header_left_edge_(NULL), 225 header_left_edge_(NULL),
226 header_right_edge_(NULL), 226 header_right_edge_(NULL),
227 previous_theme_frame_id_(0), 227 previous_theme_frame_id_(0),
228 previous_theme_frame_overlay_id_(0), 228 previous_theme_frame_overlay_id_(0),
229 previous_opacity_(0), 229 previous_opacity_(0),
230 crossfade_theme_frame_id_(0), 230 crossfade_theme_frame_id_(0),
231 crossfade_theme_frame_overlay_id_(0), 231 crossfade_theme_frame_overlay_id_(0),
232 crossfade_opacity_(0), 232 crossfade_opacity_(0),
233 crossfade_animation_(NULL), 233 size_button_behavior_(SIZE_BUTTON_MAXIMIZES) {}
234 size_button_behavior_(SIZE_BUTTON_MAXIMIZES) {
235 }
236 234
237 FramePainter::~FramePainter() { 235 FramePainter::~FramePainter() {
238 // Sometimes we are destroyed before the window closes, so ensure we clean up. 236 // Sometimes we are destroyed before the window closes, so ensure we clean up.
239 if (window_) { 237 if (window_) {
240 window_->RemoveObserver(this); 238 window_->RemoveObserver(this);
241 aura::RootWindow* root = window_->GetRootWindow(); 239 aura::RootWindow* root = window_->GetRootWindow();
242 if (root) 240 if (root)
243 root->RemoveObserver(this); 241 root->RemoveObserver(this);
244 } 242 }
245 } 243 }
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 int title_y = 945 int title_y =
948 (view->GetBoundsForClientView().y() - title_font.GetHeight()) / 2; 946 (view->GetBoundsForClientView().y() - title_font.GetHeight()) / 2;
949 return gfx::Rect( 947 return gfx::Rect(
950 title_x, 948 title_x,
951 std::max(0, title_y), 949 std::max(0, title_y),
952 std::max(0, size_button_->x() - kTitleLogoSpacing - title_x), 950 std::max(0, size_button_->x() - kTitleLogoSpacing - title_x),
953 title_font.GetHeight()); 951 title_font.GetHeight());
954 } 952 }
955 953
956 } // namespace ash 954 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/gestures/long_press_affordance_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698