| 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/info_bubble.h" | 5 #include "chrome/browser/ui/views/info_bubble.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "chrome/browser/ui/window_sizer.h" | 9 #include "chrome/browser/ui/window_sizer.h" |
| 10 #include "chrome/common/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 | 233 |
| 234 LRESULT BorderWidget::OnMouseActivate(HWND window, | 234 LRESULT BorderWidget::OnMouseActivate(HWND window, |
| 235 UINT hit_test, | 235 UINT hit_test, |
| 236 UINT mouse_message) { | 236 UINT mouse_message) { |
| 237 // Never activate. | 237 // Never activate. |
| 238 return MA_NOACTIVATE; | 238 return MA_NOACTIVATE; |
| 239 } | 239 } |
| 240 #endif | 240 #endif |
| 241 | 241 |
| 242 // InfoBubbleDelegate --------------------------------------------------------- |
| 243 |
| 244 std::wstring InfoBubbleDelegate::accessible_name() { |
| 245 return L""; |
| 246 } |
| 247 |
| 242 // InfoBubble ----------------------------------------------------------------- | 248 // InfoBubble ----------------------------------------------------------------- |
| 243 | 249 |
| 244 // static | 250 // static |
| 245 InfoBubble* InfoBubble::Show(views::Widget* parent, | 251 InfoBubble* InfoBubble::Show(views::Widget* parent, |
| 246 const gfx::Rect& position_relative_to, | 252 const gfx::Rect& position_relative_to, |
| 247 BubbleBorder::ArrowLocation arrow_location, | 253 BubbleBorder::ArrowLocation arrow_location, |
| 248 views::View* contents, | 254 views::View* contents, |
| 249 InfoBubbleDelegate* delegate) { | 255 InfoBubbleDelegate* delegate) { |
| 250 InfoBubble* window = new InfoBubble; | 256 InfoBubble* window = new InfoBubble; |
| 251 window->Init(parent, position_relative_to, arrow_location, | 257 window->Init(parent, position_relative_to, arrow_location, |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 animation_->Hide(); | 564 animation_->Hide(); |
| 559 } | 565 } |
| 560 | 566 |
| 561 bool InfoBubble::AcceleratorPressed(const views::Accelerator& accelerator) { | 567 bool InfoBubble::AcceleratorPressed(const views::Accelerator& accelerator) { |
| 562 if (!delegate_ || delegate_->CloseOnEscape()) { | 568 if (!delegate_ || delegate_->CloseOnEscape()) { |
| 563 DoClose(true); | 569 DoClose(true); |
| 564 return true; | 570 return true; |
| 565 } | 571 } |
| 566 return false; | 572 return false; |
| 567 } | 573 } |
| OLD | NEW |