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/display/shared_display_edge_indicator.h" | 5 #include "ash/display/shared_display_edge_indicator.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/coordinate_conversion.h" | 9 #include "ash/wm/coordinate_conversion.h" |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 views::Widget* widget = new views::Widget; | 49 views::Widget* widget = new views::Widget; |
50 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); | 50 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
51 params.transparent = true; | 51 params.transparent = true; |
52 params.can_activate = false; | 52 params.can_activate = false; |
53 params.keep_on_top = true; | 53 params.keep_on_top = true; |
54 widget->set_focus_on_creation(false); | 54 widget->set_focus_on_creation(false); |
55 widget->Init(params); | 55 widget->Init(params); |
56 widget->SetVisibilityChangedAnimationsEnabled(false); | 56 widget->SetVisibilityChangedAnimationsEnabled(false); |
57 widget->GetNativeWindow()->SetName("SharedEdgeIndicator"); | 57 widget->GetNativeWindow()->SetName("SharedEdgeIndicator"); |
58 widget->SetContentsView(contents_view); | 58 widget->SetContentsView(contents_view); |
59 gfx::Display display = gfx::Screen::GetDisplayMatching(bounds); | 59 gfx::Display display = Shell::GetScreen()->GetDisplayMatching(bounds); |
60 aura::Window* window = widget->GetNativeWindow(); | 60 aura::Window* window = widget->GetNativeWindow(); |
61 aura::client::ScreenPositionClient* screen_position_client = | 61 aura::client::ScreenPositionClient* screen_position_client = |
62 aura::client::GetScreenPositionClient(window->GetRootWindow()); | 62 aura::client::GetScreenPositionClient(window->GetRootWindow()); |
63 screen_position_client->SetBounds(window, bounds, display); | 63 screen_position_client->SetBounds(window, bounds, display); |
64 widget->Show(); | 64 widget->Show(); |
65 return widget; | 65 return widget; |
66 } | 66 } |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 SkColor color = SkColorSetARGB(0xFF, value, value, value); | 104 SkColor color = SkColorSetARGB(0xFF, value, value, value); |
105 if (src_indicator_) | 105 if (src_indicator_) |
106 static_cast<IndicatorView*>(src_indicator_)->SetColor(color); | 106 static_cast<IndicatorView*>(src_indicator_)->SetColor(color); |
107 if (dst_indicator_) | 107 if (dst_indicator_) |
108 static_cast<IndicatorView*>(dst_indicator_)->SetColor(color); | 108 static_cast<IndicatorView*>(dst_indicator_)->SetColor(color); |
109 | 109 |
110 } | 110 } |
111 | 111 |
112 } // namespace internal | 112 } // namespace internal |
113 } // namespace ash | 113 } // namespace ash |
OLD | NEW |