Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: ash/system/tray/tray_bubble_view.cc

Issue 10833041: Change web notifications to show at the top of the list, clean up layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/system/tray/tray_bubble_view.h ('k') | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698