OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |