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

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

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « ash/wm/dialog_frame_view.cc ('k') | ash/wm/panel_frame_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/wm/window_animations.h" 9 #include "ash/wm/window_animations.h"
10 #include "ash/wm/workspace/frame_maximize_button.h" 10 #include "ash/wm/workspace/frame_maximize_button.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // A class that creates all buttons and put them into a view. 285 // A class that creates all buttons and put them into a view.
286 class BubbleContentsButtonRow : public views::View, 286 class BubbleContentsButtonRow : public views::View,
287 public views::ButtonListener { 287 public views::ButtonListener {
288 public: 288 public:
289 explicit BubbleContentsButtonRow(MaximizeBubbleController::Bubble* bubble); 289 explicit BubbleContentsButtonRow(MaximizeBubbleController::Bubble* bubble);
290 290
291 virtual ~BubbleContentsButtonRow() {} 291 virtual ~BubbleContentsButtonRow() {}
292 292
293 // Overridden from ButtonListener. 293 // Overridden from ButtonListener.
294 virtual void ButtonPressed(views::Button* sender, 294 virtual void ButtonPressed(views::Button* sender,
295 const views::Event& event) OVERRIDE; 295 const ui::Event& event) OVERRIDE;
296 // Called from BubbleDialogButton. 296 // Called from BubbleDialogButton.
297 void ButtonHovered(BubbleDialogButton* sender); 297 void ButtonHovered(BubbleDialogButton* sender);
298 298
299 private: 299 private:
300 // The owning object which gets notifications. 300 // The owning object which gets notifications.
301 MaximizeBubbleController::Bubble* bubble_; 301 MaximizeBubbleController::Bubble* bubble_;
302 302
303 // The created buttons for our menu. 303 // The created buttons for our menu.
304 BubbleDialogButton* left_button_; 304 BubbleDialogButton* left_button_;
305 BubbleDialogButton* minimize_button_; 305 BubbleDialogButton* minimize_button_;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 IDR_AURA_WINDOW_POSITION_MIDDLE_P); 550 IDR_AURA_WINDOW_POSITION_MIDDLE_P);
551 right_button_ = new BubbleDialogButton( 551 right_button_ = new BubbleDialogButton(
552 this, 552 this,
553 IDR_AURA_WINDOW_POSITION_RIGHT, 553 IDR_AURA_WINDOW_POSITION_RIGHT,
554 IDR_AURA_WINDOW_POSITION_RIGHT_H, 554 IDR_AURA_WINDOW_POSITION_RIGHT_H,
555 IDR_AURA_WINDOW_POSITION_RIGHT_P); 555 IDR_AURA_WINDOW_POSITION_RIGHT_P);
556 } 556 }
557 557
558 // Overridden from ButtonListener. 558 // Overridden from ButtonListener.
559 void BubbleContentsButtonRow::ButtonPressed(views::Button* sender, 559 void BubbleContentsButtonRow::ButtonPressed(views::Button* sender,
560 const views::Event& event) { 560 const ui::Event& event) {
561 // While shutting down, the connection to the owner might already be broken. 561 // While shutting down, the connection to the owner might already be broken.
562 if (!bubble_->controller()) 562 if (!bubble_->controller())
563 return; 563 return;
564 if (sender == left_button_) 564 if (sender == left_button_)
565 bubble_->controller()->OnButtonClicked(SNAP_LEFT); 565 bubble_->controller()->OnButtonClicked(SNAP_LEFT);
566 else if (sender == minimize_button_) 566 else if (sender == minimize_button_)
567 bubble_->controller()->OnButtonClicked(SNAP_MINIMIZE); 567 bubble_->controller()->OnButtonClicked(SNAP_MINIMIZE);
568 else if (sender == right_button_) 568 else if (sender == right_button_)
569 bubble_->controller()->OnButtonClicked(SNAP_RIGHT); 569 bubble_->controller()->OnButtonClicked(SNAP_RIGHT);
570 else 570 else
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 button_row_->ButtonHovered(this); 734 button_row_->ButtonHovered(this);
735 views::ImageButton::OnMouseEntered(event); 735 views::ImageButton::OnMouseEntered(event);
736 } 736 }
737 737
738 void BubbleDialogButton::OnMouseExited(const views::MouseEvent& event) { 738 void BubbleDialogButton::OnMouseExited(const views::MouseEvent& event) {
739 button_row_->ButtonHovered(NULL); 739 button_row_->ButtonHovered(NULL);
740 views::ImageButton::OnMouseExited(event); 740 views::ImageButton::OnMouseExited(event);
741 } 741 }
742 742
743 } // namespace ash 743 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/dialog_frame_view.cc ('k') | ash/wm/panel_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698