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

Side by Side Diff: views/window/custom_frame_view.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | « views/widget/widget_win_unittest.cc ('k') | views/window/dialog_client_view.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/window/custom_frame_view.h" 5 #include "views/window/custom_frame_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/app_resources.h" 8 #include "grit/app_resources.h"
9 #include "grit/app_strings.h" 9 #include "grit/app_strings.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 gfx::Rect bounds(0, 0, pref.width(), pref.height()); 229 gfx::Rect bounds(0, 0, pref.width(), pref.height());
230 return frame_->non_client_view()->GetWindowBoundsForClientBounds( 230 return frame_->non_client_view()->GetWindowBoundsForClientBounds(
231 bounds).size(); 231 bounds).size();
232 } 232 }
233 233
234 /////////////////////////////////////////////////////////////////////////////// 234 ///////////////////////////////////////////////////////////////////////////////
235 // CustomFrameView, ButtonListener implementation: 235 // CustomFrameView, ButtonListener implementation:
236 236
237 void CustomFrameView::ButtonPressed(Button* sender, const views::Event& event) { 237 void CustomFrameView::ButtonPressed(Button* sender, const views::Event& event) {
238 if (sender == close_button_) 238 if (sender == close_button_)
239 frame_->CloseWindow(); 239 frame_->Close();
240 else if (sender == minimize_button_) 240 else if (sender == minimize_button_)
241 frame_->Minimize(); 241 frame_->Minimize();
242 else if (sender == maximize_button_) 242 else if (sender == maximize_button_)
243 frame_->Maximize(); 243 frame_->Maximize();
244 else if (sender == restore_button_) 244 else if (sender == restore_button_)
245 frame_->Restore(); 245 frame_->Restore();
246 } 246 }
247 247
248 /////////////////////////////////////////////////////////////////////////////// 248 ///////////////////////////////////////////////////////////////////////////////
249 // CustomFrameView, private: 249 // CustomFrameView, private:
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 title_font_ = new gfx::Font(WindowWin::GetWindowTitleFont()); 571 title_font_ = new gfx::Font(WindowWin::GetWindowTitleFont());
572 #elif defined(OS_LINUX) 572 #elif defined(OS_LINUX)
573 // TODO(ben): need to resolve what font this is. 573 // TODO(ben): need to resolve what font this is.
574 title_font_ = new gfx::Font(); 574 title_font_ = new gfx::Font();
575 #endif 575 #endif
576 initialized = true; 576 initialized = true;
577 } 577 }
578 } 578 }
579 579
580 } // namespace views 580 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/widget_win_unittest.cc ('k') | views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698