| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/setting_level_bubble.h" | 5 #include "chrome/browser/chromeos/setting_level_bubble.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chrome/browser/chromeos/login/background_view.h" | 9 #include "chrome/browser/chromeos/login/background_view.h" |
| 10 #include "chrome/browser/chromeos/login/base_login_display_host.h" | 10 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // Calculate the position in screen coordinates that the bubble should | 82 // Calculate the position in screen coordinates that the bubble should |
| 83 // "point" at (since we use BubbleBorder::FLOAT, this position actually | 83 // "point" at (since we use BubbleBorder::FLOAT, this position actually |
| 84 // specifies the center of the bubble). | 84 // specifies the center of the bubble). |
| 85 gfx::Rect monitor_area = gfx::Screen::GetMonitorAreaNearestWindow(NULL); | 85 gfx::Rect monitor_area = gfx::Screen::GetMonitorAreaNearestWindow(NULL); |
| 86 return (gfx::Point( | 86 return (gfx::Point( |
| 87 monitor_area.x() + kBubbleXRatio * monitor_area.width(), | 87 monitor_area.x() + kBubbleXRatio * monitor_area.width(), |
| 88 monitor_area.bottom() - view_size.height() / 2 - kBubbleBottomGap)); | 88 monitor_area.bottom() - view_size.height() / 2 - kBubbleBottomGap)); |
| 89 } | 89 } |
| 90 | 90 |
| 91 SettingLevelBubbleDelegateView::SettingLevelBubbleDelegateView() | 91 SettingLevelBubbleDelegateView::SettingLevelBubbleDelegateView() |
| 92 : BubbleDelegateView(NULL, views::BubbleBorder::FLOAT, SK_ColorWHITE), | 92 : BubbleDelegateView(NULL, views::BubbleBorder::FLOAT), |
| 93 view_(NULL) { | 93 view_(NULL) { |
| 94 set_close_on_esc(false); | 94 set_close_on_esc(false); |
| 95 set_use_focusless(true); | 95 set_use_focusless(true); |
| 96 } | 96 } |
| 97 | 97 |
| 98 SettingLevelBubbleDelegateView::~SettingLevelBubbleDelegateView() { | 98 SettingLevelBubbleDelegateView::~SettingLevelBubbleDelegateView() { |
| 99 view_ = NULL; | 99 view_ = NULL; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void SettingLevelBubbleDelegateView::Init() { | 102 void SettingLevelBubbleDelegateView::Init() { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 255 |
| 256 last_target_update_time_ = now; | 256 last_target_update_time_ = now; |
| 257 } | 257 } |
| 258 | 258 |
| 259 void SettingLevelBubble::StopAnimation() { | 259 void SettingLevelBubble::StopAnimation() { |
| 260 animation_timer_.Stop(); | 260 animation_timer_.Stop(); |
| 261 is_animating_ = false; | 261 is_animating_ = false; |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace chromeos | 264 } // namespace chromeos |
| OLD | NEW |