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

Side by Side Diff: ui/views/window/custom_frame_view.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 | « ui/views/window/custom_frame_view.h ('k') | ui/views/window/dialog_client_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 "ui/views/window/custom_frame_view.h" 5 #include "ui/views/window/custom_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 gfx::Size CustomFrameView::GetPreferredSize() { 233 gfx::Size CustomFrameView::GetPreferredSize() {
234 return frame_->non_client_view()->GetWindowBoundsForClientBounds( 234 return frame_->non_client_view()->GetWindowBoundsForClientBounds(
235 gfx::Rect(frame_->client_view()->GetPreferredSize())).size(); 235 gfx::Rect(frame_->client_view()->GetPreferredSize())).size();
236 } 236 }
237 237
238 /////////////////////////////////////////////////////////////////////////////// 238 ///////////////////////////////////////////////////////////////////////////////
239 // CustomFrameView, ButtonListener implementation: 239 // CustomFrameView, ButtonListener implementation:
240 240
241 void CustomFrameView::ButtonPressed(Button* sender, const Event& event) { 241 void CustomFrameView::ButtonPressed(Button* sender, const ui::Event& event) {
242 if (sender == close_button_) 242 if (sender == close_button_)
243 frame_->Close(); 243 frame_->Close();
244 else if (sender == minimize_button_) 244 else if (sender == minimize_button_)
245 frame_->Minimize(); 245 frame_->Minimize();
246 else if (sender == maximize_button_) 246 else if (sender == maximize_button_)
247 frame_->Maximize(); 247 frame_->Maximize();
248 else if (sender == restore_button_) 248 else if (sender == restore_button_)
249 frame_->Restore(); 249 frame_->Restore();
250 } 250 }
251 251
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 rb.GetImageNamed(normal_image_id).ToImageSkia()); 546 rb.GetImageNamed(normal_image_id).ToImageSkia());
547 button->SetImage(CustomButton::BS_HOT, 547 button->SetImage(CustomButton::BS_HOT,
548 rb.GetImageNamed(hot_image_id).ToImageSkia()); 548 rb.GetImageNamed(hot_image_id).ToImageSkia());
549 button->SetImage(CustomButton::BS_PUSHED, 549 button->SetImage(CustomButton::BS_PUSHED,
550 rb.GetImageNamed(pushed_image_id).ToImageSkia()); 550 rb.GetImageNamed(pushed_image_id).ToImageSkia());
551 AddChildView(button); 551 AddChildView(button);
552 return button; 552 return button;
553 } 553 }
554 554
555 } // namespace views 555 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/custom_frame_view.h ('k') | ui/views/window/dialog_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698