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

Side by Side Diff: ash/wm/maximize_bubble_controller.cc

Issue 12897004: Remove BubbleDelegateView::Show(); call GetWidget()->Show() instead; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup more BubbleDelegateView::Show() calls. Created 7 years, 9 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/wm/maximize_bubble_controller.h" 5 #include "ash/wm/maximize_bubble_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/window_animations.h" 10 #include "ash/wm/window_animations.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 bubble_widget_->non_client_view()->frame_view()->set_background(NULL); 418 bubble_widget_->non_client_view()->frame_view()->set_background(NULL);
419 419
420 bubble_border_ = new MaximizeBubbleBorder(this, anchor_view()); 420 bubble_border_ = new MaximizeBubbleBorder(this, anchor_view());
421 GetBubbleFrameView()->SetBubbleBorder(bubble_border_); 421 GetBubbleFrameView()->SetBubbleBorder(bubble_border_);
422 GetBubbleFrameView()->set_background(NULL); 422 GetBubbleFrameView()->set_background(NULL);
423 423
424 // Recalculate size with new border. 424 // Recalculate size with new border.
425 SizeToContents(); 425 SizeToContents();
426 426
427 if (!appearance_delay_ms_) 427 if (!appearance_delay_ms_)
428 Show(); 428 GetWidget()->Show();
429 else 429 else
430 StartFade(true); 430 StartFade(true);
431 431
432 ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction( 432 ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction(
433 ash::UMA_MAXIMIZE_BUTTON_SHOW_BUBBLE); 433 ash::UMA_MAXIMIZE_BUTTON_SHOW_BUBBLE);
434 434
435 mouse_watcher_.reset(new views::MouseWatcher( 435 mouse_watcher_.reset(new views::MouseWatcher(
436 new BubbleMouseWatcherHost(this), 436 new BubbleMouseWatcherHost(this),
437 this)); 437 this));
438 mouse_watcher_->Start(); 438 mouse_watcher_->Start();
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 if (!GetBoundsInScreen().Contains(screen_location)) 856 if (!GetBoundsInScreen().Contains(screen_location))
857 button_row_->ButtonHovered(NULL); 857 button_row_->ButtonHovered(NULL);
858 else 858 else
859 button_row_->ButtonHovered(this); 859 button_row_->ButtonHovered(this);
860 860
861 // Pass the event on to the normal handler. 861 // Pass the event on to the normal handler.
862 return views::ImageButton::OnMouseDragged(event); 862 return views::ImageButton::OnMouseDragged(event);
863 } 863 }
864 864
865 } // namespace ash 865 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698