OLD | NEW |
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 "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/logging.h" // DCHECK | 10 #include "base/logging.h" // DCHECK |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 // Separator between the maximize and close buttons. It overlaps the left | 362 // Separator between the maximize and close buttons. It overlaps the left |
363 // edge of the close button. | 363 // edge of the close button. |
364 canvas->DrawImageInt(*button_separator_, | 364 canvas->DrawImageInt(*button_separator_, |
365 close_button_->x(), | 365 close_button_->x(), |
366 close_button_->y()); | 366 close_button_->y()); |
367 | 367 |
368 // We don't need the extra lightness in the edges when we're at the top edge | 368 // We don't need the extra lightness in the edges when we're at the top edge |
369 // of the screen. | 369 // of the screen. |
370 // TODO(oshima): This will not work under multi-display, need to add method | 370 // TODO(oshima): This will not work under multi-display, need to add method |
371 // like GetWindowBoundsInDisplay(). | 371 // like GetWindowBoundsInDisplay(). |
372 if (frame_->GetWindowScreenBounds().y() == 0) | 372 if (frame_->GetWindowBoundsInScreen().y() == 0) |
373 return; | 373 return; |
374 | 374 |
375 // Draw the top corners and edge. | 375 // Draw the top corners and edge. |
376 int top_left_height = top_left_corner_->height(); | 376 int top_left_height = top_left_corner_->height(); |
377 canvas->DrawImageInt(*top_left_corner_, | 377 canvas->DrawImageInt(*top_left_corner_, |
378 0, 0, top_left_corner_->width(), top_left_height, | 378 0, 0, top_left_corner_->width(), top_left_height, |
379 0, 0, top_left_corner_->width(), top_left_height, | 379 0, 0, top_left_corner_->width(), top_left_height, |
380 false); | 380 false); |
381 canvas->TileImageInt(*top_edge_, | 381 canvas->TileImageInt(*top_edge_, |
382 top_left_corner_->width(), | 382 top_left_corner_->width(), |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); | 616 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); |
617 it != instances_->end(); | 617 it != instances_->end(); |
618 ++it) { | 618 ++it) { |
619 FramePainter* painter = *it; | 619 FramePainter* painter = *it; |
620 if (IsVisibleNormalWindow(painter->window_)) | 620 if (IsVisibleNormalWindow(painter->window_)) |
621 painter->frame_->non_client_view()->SchedulePaint(); | 621 painter->frame_->non_client_view()->SchedulePaint(); |
622 } | 622 } |
623 } | 623 } |
624 | 624 |
625 } // namespace ash | 625 } // namespace ash |
OLD | NEW |