| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/touch/touch_hud_debug.h" | 5 #include "ash/touch/touch_hud_debug.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 const gfx::Size& display_size = display.size(); | 345 const gfx::Size& display_size = display.size(); |
| 346 canvas_->SetSize(display_size); | 346 canvas_->SetSize(display_size); |
| 347 | 347 |
| 348 label_container_ = new views::View; | 348 label_container_ = new views::View; |
| 349 label_container_->SetLayoutManager(new views::BoxLayout( | 349 label_container_->SetLayoutManager(new views::BoxLayout( |
| 350 views::BoxLayout::kVertical, 0, 0, 0)); | 350 views::BoxLayout::kVertical, 0, 0, 0)); |
| 351 | 351 |
| 352 for (int i = 0; i < kMaxTouchPoints; ++i) { | 352 for (int i = 0; i < kMaxTouchPoints; ++i) { |
| 353 touch_labels_[i] = new views::Label; | 353 touch_labels_[i] = new views::Label; |
| 354 touch_labels_[i]->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); | 354 touch_labels_[i]->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); |
| 355 touch_labels_[i]->SetShadowColors(SK_ColorWHITE, | 355 touch_labels_[i]->set_shadows(gfx::ShadowValues(1, |
| 356 SK_ColorWHITE); | 356 gfx::ShadowValue(gfx::Point(1, 1), 0, SK_ColorWHITE))); |
| 357 touch_labels_[i]->SetShadowOffset(1, 1); | |
| 358 label_container_->AddChildView(touch_labels_[i]); | 357 label_container_->AddChildView(touch_labels_[i]); |
| 359 } | 358 } |
| 360 label_container_->SetX(0); | 359 label_container_->SetX(0); |
| 361 label_container_->SetY(display_size.height() / kReducedScale); | 360 label_container_->SetY(display_size.height() / kReducedScale); |
| 362 label_container_->SetSize(label_container_->GetPreferredSize()); | 361 label_container_->SetSize(label_container_->GetPreferredSize()); |
| 363 label_container_->SetVisible(false); | 362 label_container_->SetVisible(false); |
| 364 content->AddChildView(label_container_); | 363 content->AddChildView(label_container_); |
| 365 } | 364 } |
| 366 | 365 |
| 367 TouchHudDebug::~TouchHudDebug() { | 366 TouchHudDebug::~TouchHudDebug() { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 RootWindowController* controller) { | 479 RootWindowController* controller) { |
| 481 controller->set_touch_hud_debug(this); | 480 controller->set_touch_hud_debug(this); |
| 482 } | 481 } |
| 483 | 482 |
| 484 void TouchHudDebug::UnsetHudForRootWindowController( | 483 void TouchHudDebug::UnsetHudForRootWindowController( |
| 485 RootWindowController* controller) { | 484 RootWindowController* controller) { |
| 486 controller->set_touch_hud_debug(NULL); | 485 controller->set_touch_hud_debug(NULL); |
| 487 } | 486 } |
| 488 | 487 |
| 489 } // namespace ash | 488 } // namespace ash |
| OLD | NEW |