| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 "window_manager/hotkey_overlay.h" | 5 #include "window_manager/hotkey_overlay.h" |
| 6 | 6 |
| 7 #include <gflags/gflags.h> | 7 #include <gflags/gflags.h> |
| 8 | 8 |
| 9 #include "window_manager/clutter_interface.h" | 9 #include "window_manager/clutter_interface.h" |
| 10 | 10 |
| 11 DEFINE_string(hotkey_overlay_image_dir, "../assets/images", | 11 DEFINE_string(hotkey_overlay_image_dir, "../assets/images", |
| 12 "Path to directory containing hotkey overlay images"); | 12 "Path to directory containing hotkey overlay images"); |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace window_manager { |
| 15 | 15 |
| 16 // Time to spend in image transitions, in milliseconds. | 16 // Time to spend in image transitions, in milliseconds. |
| 17 // TODO: It'd be nice to do a fade here, but fading from one image to | 17 // TODO: It'd be nice to do a fade here, but fading from one image to |
| 18 // another looks terrible because of the way that alpha compositing is | 18 // another looks terrible because of the way that alpha compositing is |
| 19 // currently working. | 19 // currently working. |
| 20 static const int kAnimMs = 0; | 20 static const int kAnimMs = 0; |
| 21 | 21 |
| 22 HotkeyOverlay::HotkeyOverlay(ClutterInterface* clutter) | 22 HotkeyOverlay::HotkeyOverlay(ClutterInterface* clutter) |
| 23 : clutter_(clutter), | 23 : clutter_(clutter), |
| 24 group_(clutter_->CreateGroup()), | 24 group_(clutter_->CreateGroup()), |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 void HotkeyOverlay::HideCurrentImage() { | 129 void HotkeyOverlay::HideCurrentImage() { |
| 130 if (!current_image_) | 130 if (!current_image_) |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 current_image_->SetOpacity(0, kAnimMs); | 133 current_image_->SetOpacity(0, kAnimMs); |
| 134 current_image_ = NULL; | 134 current_image_ = NULL; |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace chromeos | 137 } // namespace window_manager |
| OLD | NEW |