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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 canvas->DrawImageInt(*theme_frame_overlay, 0, 0); | 369 canvas->DrawImageInt(*theme_frame_overlay, 0, 0); |
370 | 370 |
371 // Separator between the maximize and close buttons. It overlaps the left | 371 // Separator between the maximize and close buttons. It overlaps the left |
372 // edge of the close button. | 372 // edge of the close button. |
373 canvas->DrawImageInt(*button_separator_, | 373 canvas->DrawImageInt(*button_separator_, |
374 close_button_->x(), | 374 close_button_->x(), |
375 close_button_->y()); | 375 close_button_->y()); |
376 | 376 |
377 // We don't need the extra lightness in the edges when we're at the top edge | 377 // We don't need the extra lightness in the edges when we're at the top edge |
378 // of the screen. | 378 // of the screen. |
379 // TODO(oshima): This will not work under multi-monitor, need to add method | 379 // TODO(oshima): This will not work under multi-display, need to add method |
380 // like GetWindowBoundsInMonitor(). | 380 // like GetWindowBoundsInDisplay(). |
381 if (frame_->GetWindowScreenBounds().y() == 0) | 381 if (frame_->GetWindowScreenBounds().y() == 0) |
382 return; | 382 return; |
383 | 383 |
384 // Draw the top corners and edge. | 384 // Draw the top corners and edge. |
385 int top_left_height = top_left_corner_->height(); | 385 int top_left_height = top_left_corner_->height(); |
386 canvas->DrawImageInt(*top_left_corner_, | 386 canvas->DrawImageInt(*top_left_corner_, |
387 0, 0, top_left_corner_->width(), top_left_height, | 387 0, 0, top_left_corner_->width(), top_left_height, |
388 0, 0, top_left_corner_->width(), top_left_height, | 388 0, 0, top_left_corner_->width(), top_left_height, |
389 false); | 389 false); |
390 canvas->TileImageInt(*top_edge_, | 390 canvas->TileImageInt(*top_edge_, |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); | 622 for (std::set<FramePainter*>::const_iterator it = instances_->begin(); |
623 it != instances_->end(); | 623 it != instances_->end(); |
624 ++it) { | 624 ++it) { |
625 FramePainter* painter = *it; | 625 FramePainter* painter = *it; |
626 if (IsVisibleNormalWindow(painter->window_)) | 626 if (IsVisibleNormalWindow(painter->window_)) |
627 painter->frame_->non_client_view()->SchedulePaint(); | 627 painter->frame_->non_client_view()->SchedulePaint(); |
628 } | 628 } |
629 } | 629 } |
630 | 630 |
631 } // namespace ash | 631 } // namespace ash |
OLD | NEW |