OLD | NEW |
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 "chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h" |
6 | 6 |
7 #include "ash/wm/frame_painter.h" | 7 #include "ash/wm/frame_painter.h" |
8 #include "ash/wm/workspace/frame_maximize_button.h" | 8 #include "ash/wm/workspace/frame_maximize_button.h" |
9 #include "chrome/browser/themes/theme_service.h" | 9 #include "chrome/browser/themes/theme_service.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 | 364 |
365 gfx::Size BrowserNonClientFrameViewAsh::GetMinimumSize() { | 365 gfx::Size BrowserNonClientFrameViewAsh::GetMinimumSize() { |
366 return frame_painter_->GetMinimumSize(this); | 366 return frame_painter_->GetMinimumSize(this); |
367 } | 367 } |
368 | 368 |
369 /////////////////////////////////////////////////////////////////////////////// | 369 /////////////////////////////////////////////////////////////////////////////// |
370 // views::ButtonListener overrides: | 370 // views::ButtonListener overrides: |
371 | 371 |
372 void BrowserNonClientFrameViewAsh::ButtonPressed(views::Button* sender, | 372 void BrowserNonClientFrameViewAsh::ButtonPressed(views::Button* sender, |
373 const views::Event& event) { | 373 const ui::Event& event) { |
374 // When shift-clicking slow down animations for visual debugging. | 374 // When shift-clicking slow down animations for visual debugging. |
375 // We used to do this via an event filter that looked for the shift key being | 375 // We used to do this via an event filter that looked for the shift key being |
376 // pressed but this interfered with several normal keyboard shortcuts. | 376 // pressed but this interfered with several normal keyboard shortcuts. |
377 if (event.IsShiftDown()) | 377 if (event.IsShiftDown()) |
378 ui::LayerAnimator::set_slow_animation_mode(true); | 378 ui::LayerAnimator::set_slow_animation_mode(true); |
379 | 379 |
380 if (sender == size_button_) { | 380 if (sender == size_button_) { |
381 // The maximize button may move out from under the cursor. | 381 // The maximize button may move out from under the cursor. |
382 ResetWindowControls(); | 382 ResetWindowControls(); |
383 if (size_button_minimizes_) | 383 if (size_button_minimizes_) |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImage() const { | 606 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImage() const { |
607 ui::ThemeProvider* tp = GetThemeProvider(); | 607 ui::ThemeProvider* tp = GetThemeProvider(); |
608 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && | 608 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && |
609 browser_view()->IsBrowserTypeNormal() && | 609 browser_view()->IsBrowserTypeNormal() && |
610 !browser_view()->IsOffTheRecord()) { | 610 !browser_view()->IsOffTheRecord()) { |
611 return tp->GetImageSkiaNamed(ShouldPaintAsActive() ? | 611 return tp->GetImageSkiaNamed(ShouldPaintAsActive() ? |
612 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE); | 612 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE); |
613 } | 613 } |
614 return NULL; | 614 return NULL; |
615 } | 615 } |
OLD | NEW |