| 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/system/tray/tray_bubble_view.h" | 5 #include "ash/system/tray/tray_bubble_view.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "ash/wm/shelf_layout_manager.h" | 10 #include "ash/wm/shelf_layout_manager.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 void TrayBubbleView::SetBubbleBorder(int arrow_offset) { | 239 void TrayBubbleView::SetBubbleBorder(int arrow_offset) { |
| 240 DCHECK(GetWidget()); | 240 DCHECK(GetWidget()); |
| 241 TrayBubbleBorder* bubble_border = new TrayBubbleBorder( | 241 TrayBubbleBorder* bubble_border = new TrayBubbleBorder( |
| 242 this, anchor_view(), arrow_location(), arrow_offset); | 242 this, anchor_view(), arrow_location(), arrow_offset); |
| 243 GetBubbleFrameView()->SetBubbleBorder(bubble_border); | 243 GetBubbleFrameView()->SetBubbleBorder(bubble_border); |
| 244 // Recalculate size with new border. | 244 // Recalculate size with new border. |
| 245 SizeToContents(); | 245 SizeToContents(); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void TrayBubbleView::UpdateAnchor() { | 248 void TrayBubbleView::UpdateBubble() { |
| 249 SizeToContents(); | 249 SizeToContents(); |
| 250 GetWidget()->GetRootView()->SchedulePaint(); | 250 GetWidget()->GetRootView()->SchedulePaint(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 void TrayBubbleView::SetMaxHeight(int height) { | 253 void TrayBubbleView::SetMaxHeight(int height) { |
| 254 max_height_ = height; | 254 max_height_ = height; |
| 255 if (GetWidget()) | 255 if (GetWidget()) |
| 256 SizeToContents(); | 256 SizeToContents(); |
| 257 } | 257 } |
| 258 | 258 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 return; | 387 return; |
| 388 } | 388 } |
| 389 // Handle clicking outside the bubble and tray. We don't block the event, so | 389 // Handle clicking outside the bubble and tray. We don't block the event, so |
| 390 // it will also be handled by whatever widget was clicked on. | 390 // it will also be handled by whatever widget was clicked on. |
| 391 OnClickedOutsideView(); | 391 OnClickedOutsideView(); |
| 392 } | 392 } |
| 393 | 393 |
| 394 | 394 |
| 395 } // namespace internal | 395 } // namespace internal |
| 396 } // namespace ash | 396 } // namespace ash |
| OLD | NEW |