| 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/tooltips/tooltip_controller.h" | 5 #include "ash/tooltips/tooltip_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // Creates a widget of type TYPE_TOOLTIP | 107 // Creates a widget of type TYPE_TOOLTIP |
| 108 views::Widget* CreateTooltip() { | 108 views::Widget* CreateTooltip() { |
| 109 views::Widget* widget = new views::Widget; | 109 views::Widget* widget = new views::Widget; |
| 110 views::Widget::InitParams params; | 110 views::Widget::InitParams params; |
| 111 // For aura, since we set the type to TOOLTIP_TYPE, the widget will get | 111 // For aura, since we set the type to TOOLTIP_TYPE, the widget will get |
| 112 // auto-parented to the MenuAndTooltipsContainer. | 112 // auto-parented to the MenuAndTooltipsContainer. |
| 113 params.type = views::Widget::InitParams::TYPE_TOOLTIP; | 113 params.type = views::Widget::InitParams::TYPE_TOOLTIP; |
| 114 params.keep_on_top = true; | 114 params.keep_on_top = true; |
| 115 params.accept_events = false; | 115 params.accept_events = false; |
| 116 params.transparent = true; | |
| 117 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 116 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 118 widget->Init(params); | 117 widget->Init(params); |
| 119 return widget; | 118 return widget; |
| 120 } | 119 } |
| 121 | 120 |
| 122 } // namespace | 121 } // namespace |
| 123 | 122 |
| 124 namespace ash { | 123 namespace ash { |
| 125 namespace internal { | 124 namespace internal { |
| 126 | 125 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 } | 321 } |
| 323 } | 322 } |
| 324 } | 323 } |
| 325 | 324 |
| 326 bool TooltipController::IsTooltipVisible() { | 325 bool TooltipController::IsTooltipVisible() { |
| 327 return tooltip_->IsVisible(); | 326 return tooltip_->IsVisible(); |
| 328 } | 327 } |
| 329 | 328 |
| 330 } // namespace internal | 329 } // namespace internal |
| 331 } // namespace ash | 330 } // namespace ash |
| OLD | NEW |