Chromium Code Reviews| 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/ui/views/bubble/bubble.h" | 5 #include "chrome/browser/ui/views/bubble/bubble.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "chrome/browser/ui/views/bubble/border_contents.h" | 9 #include "chrome/browser/ui/views/bubble/border_contents.h" |
| 10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 #endif | 104 #endif |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 void Bubble::AnimationProgressed(const ui::Animation* animation) { | 108 void Bubble::AnimationProgressed(const ui::Animation* animation) { |
| 109 // Set the opacity for the main contents window. | 109 // Set the opacity for the main contents window. |
| 110 unsigned char opacity = static_cast<unsigned char>( | 110 unsigned char opacity = static_cast<unsigned char>( |
| 111 animation_->GetCurrentValue() * 255); | 111 animation_->GetCurrentValue() * 255); |
| 112 #if defined(USE_AURA) | 112 #if defined(USE_AURA) |
| 113 // TODO(beng): | 113 // TODO(beng): |
| 114 (void)opacity; | |
|
Ben Goodger (Google)
2011/09/16 01:11:18
que?
Emmanuel Saint-loubert-Bié
2011/09/16 02:34:54
without the (void) you get a warning that you have
Ben Goodger (Google)
2011/09/16 14:46:55
Huh. OK.
| |
| 114 NOTIMPLEMENTED(); | 115 NOTIMPLEMENTED(); |
| 115 #elif defined(OS_WIN) | 116 #elif defined(OS_WIN) |
| 116 SetLayeredWindowAttributes(GetNativeView(), 0, | 117 SetLayeredWindowAttributes(GetNativeView(), 0, |
| 117 static_cast<byte>(opacity), LWA_ALPHA); | 118 static_cast<byte>(opacity), LWA_ALPHA); |
| 118 contents_->SchedulePaint(); | 119 contents_->SchedulePaint(); |
| 119 | 120 |
| 120 // Also fade in/out the bubble border window. | 121 // Also fade in/out the bubble border window. |
| 121 border_->SetOpacity(opacity); | 122 border_->SetOpacity(opacity); |
| 122 border_->border_contents()->SchedulePaint(); | 123 border_->border_contents()->SchedulePaint(); |
| 123 #else | 124 #else |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 433 animation_->Hide(); | 434 animation_->Hide(); |
| 434 } | 435 } |
| 435 | 436 |
| 436 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) { | 437 bool Bubble::AcceleratorPressed(const views::Accelerator& accelerator) { |
| 437 if (!delegate_ || delegate_->CloseOnEscape()) { | 438 if (!delegate_ || delegate_->CloseOnEscape()) { |
| 438 DoClose(true); | 439 DoClose(true); |
| 439 return true; | 440 return true; |
| 440 } | 441 } |
| 441 return false; | 442 return false; |
| 442 } | 443 } |
| OLD | NEW |