| 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/gestures/long_press_affordance_handler.h" | 5 #include "ash/wm/gestures/long_press_affordance_handler.h" |
| 6 | 6 |
| 7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 views::Widget* CreateAffordanceWidget(aura::RootWindow* root_window) { | 61 views::Widget* CreateAffordanceWidget(aura::RootWindow* root_window) { |
| 62 views::Widget* widget = new views::Widget; | 62 views::Widget* widget = new views::Widget; |
| 63 views::Widget::InitParams params; | 63 views::Widget::InitParams params; |
| 64 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; | 64 params.type = views::Widget::InitParams::TYPE_WINDOW_FRAMELESS; |
| 65 params.keep_on_top = true; | 65 params.keep_on_top = true; |
| 66 params.accept_events = false; | 66 params.accept_events = false; |
| 67 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 67 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 68 params.transparent = true; | 68 params.transparent = true; |
| 69 widget->Init(params); | 69 widget->Init(params); |
| 70 widget->SetOpacity(0xFF); | 70 widget->SetOpacity(0xFF); |
| 71 widget->GetNativeWindow()->SetParent( | 71 ash::GetRootWindowController(root_window)->GetContainer( |
| 72 ash::GetRootWindowController(root_window)->GetContainer( | 72 ash::internal::kShellWindowId_OverlayContainer)->AddChild( |
| 73 ash::internal::kShellWindowId_OverlayContainer)); | 73 widget->GetNativeWindow()); |
| 74 return widget; | 74 return widget; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void PaintAffordanceArc(gfx::Canvas* canvas, | 77 void PaintAffordanceArc(gfx::Canvas* canvas, |
| 78 gfx::Point& center, | 78 gfx::Point& center, |
| 79 int radius, | 79 int radius, |
| 80 int start_angle, | 80 int start_angle, |
| 81 int end_angle) { | 81 int end_angle) { |
| 82 SkPaint paint; | 82 SkPaint paint; |
| 83 paint.setStyle(SkPaint::kStroke_Style); | 83 paint.setStyle(SkPaint::kStroke_Style); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 default: | 369 default: |
| 370 view_.reset(); | 370 view_.reset(); |
| 371 tap_down_touch_id_ = -1; | 371 tap_down_touch_id_ = -1; |
| 372 tap_down_display_id_ = 0; | 372 tap_down_display_id_ = 0; |
| 373 break; | 373 break; |
| 374 } | 374 } |
| 375 } | 375 } |
| 376 | 376 |
| 377 } // namespace internal | 377 } // namespace internal |
| 378 } // namespace ash | 378 } // namespace ash |
| OLD | NEW |