| 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/common/system/tray/tray_background_view.h" | 5 #include "ash/common/system/tray/tray_background_view.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/shelf/shelf_constants.h" | 8 #include "ash/common/shelf/shelf_constants.h" |
| 9 #include "ash/common/shelf/wm_shelf.h" | 9 #include "ash/common/shelf/wm_shelf.h" |
| 10 #include "ash/common/shelf/wm_shelf_util.h" | 10 #include "ash/common/shelf/wm_shelf_util.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 views::BoxLayout* layout = new views::BoxLayout(orientation, 0, 0, 0); | 241 views::BoxLayout* layout = new views::BoxLayout(orientation, 0, 0, 0); |
| 242 layout->SetDefaultFlex(1); | 242 layout->SetDefaultFlex(1); |
| 243 views::View::SetLayoutManager(layout); | 243 views::View::SetLayoutManager(layout); |
| 244 PreferredSizeChanged(); | 244 PreferredSizeChanged(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 //////////////////////////////////////////////////////////////////////////////// | 247 //////////////////////////////////////////////////////////////////////////////// |
| 248 // TrayBackgroundView | 248 // TrayBackgroundView |
| 249 | 249 |
| 250 TrayBackgroundView::TrayBackgroundView(WmShelf* wm_shelf) | 250 TrayBackgroundView::TrayBackgroundView(WmShelf* wm_shelf) |
| 251 : wm_shelf_(wm_shelf), | 251 : ActionableView(nullptr), |
| 252 wm_shelf_(wm_shelf), |
| 252 tray_container_(NULL), | 253 tray_container_(NULL), |
| 253 shelf_alignment_(SHELF_ALIGNMENT_BOTTOM), | 254 shelf_alignment_(SHELF_ALIGNMENT_BOTTOM), |
| 254 background_(NULL), | 255 background_(NULL), |
| 255 draw_background_as_active_(false), | 256 draw_background_as_active_(false), |
| 256 is_separator_visible_(false), | 257 is_separator_visible_(false), |
| 257 widget_observer_(new TrayWidgetObserver(this)) { | 258 widget_observer_(new TrayWidgetObserver(this)) { |
| 258 DCHECK(wm_shelf_); | 259 DCHECK(wm_shelf_); |
| 259 set_notify_enter_exit_on_child(true); | 260 set_notify_enter_exit_on_child(true); |
| 260 | 261 |
| 261 tray_container_ = new TrayContainer(shelf_alignment_); | 262 tray_container_ = new TrayContainer(shelf_alignment_); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 paint.setAntiAlias(true); | 563 paint.setAntiAlias(true); |
| 563 | 564 |
| 564 const gfx::Rect bounds = horizontal_shelf ? gfx::Rect(x, y, width, height) | 565 const gfx::Rect bounds = horizontal_shelf ? gfx::Rect(x, y, width, height) |
| 565 : gfx::Rect(y, x, height, width); | 566 : gfx::Rect(y, x, height, width); |
| 566 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale)); | 567 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale)); |
| 567 canvas->DrawLine(horizontal_shelf ? rect.top_right() : rect.bottom_left(), | 568 canvas->DrawLine(horizontal_shelf ? rect.top_right() : rect.bottom_left(), |
| 568 rect.bottom_right(), paint); | 569 rect.bottom_right(), paint); |
| 569 } | 570 } |
| 570 | 571 |
| 571 } // namespace ash | 572 } // namespace ash |
| OLD | NEW |