| 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/frame/app_non_client_frame_view_aura.h" | 5 #include "chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h" |
| 6 | 6 |
| 7 #include "ash/wm/workspace/frame_maximize_button.h" | 7 #include "ash/wm/workspace/frame_maximize_button.h" |
| 8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
| 9 #include "chrome/browser/ui/views/frame/browser_frame.h" | 9 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 // Sets images whose ids are passed in for each of the respective states | 129 // Sets images whose ids are passed in for each of the respective states |
| 130 // of |button|. | 130 // of |button|. |
| 131 void SetButtonImages(views::ImageButton* button, int normal_bitmap_id, | 131 void SetButtonImages(views::ImageButton* button, int normal_bitmap_id, |
| 132 int hot_bitmap_id, int pushed_bitmap_id) { | 132 int hot_bitmap_id, int pushed_bitmap_id) { |
| 133 ui::ThemeProvider* theme_provider = GetThemeProvider(); | 133 ui::ThemeProvider* theme_provider = GetThemeProvider(); |
| 134 button->SetImage(views::CustomButton::BS_NORMAL, | 134 button->SetImage(views::CustomButton::BS_NORMAL, |
| 135 theme_provider->GetBitmapNamed(normal_bitmap_id)); | 135 theme_provider->GetImageSkiaNamed(normal_bitmap_id)); |
| 136 button->SetImage(views::CustomButton::BS_HOT, | 136 button->SetImage(views::CustomButton::BS_HOT, |
| 137 theme_provider->GetBitmapNamed(hot_bitmap_id)); | 137 theme_provider->GetImageSkiaNamed(hot_bitmap_id)); |
| 138 button->SetImage(views::CustomButton::BS_PUSHED, | 138 button->SetImage(views::CustomButton::BS_PUSHED, |
| 139 theme_provider->GetBitmapNamed(pushed_bitmap_id)); | 139 theme_provider->GetImageSkiaNamed(pushed_bitmap_id)); |
| 140 } | 140 } |
| 141 | 141 |
| 142 AppNonClientFrameViewAura* owner_; | 142 AppNonClientFrameViewAura* owner_; |
| 143 views::ImageButton* close_button_; | 143 views::ImageButton* close_button_; |
| 144 views::ImageButton* restore_button_; | 144 views::ImageButton* restore_button_; |
| 145 const SkBitmap* control_base_; | 145 const SkBitmap* control_base_; |
| 146 const SkBitmap* separator_; | 146 const SkBitmap* separator_; |
| 147 const SkBitmap* shadow_; | 147 const SkBitmap* shadow_; |
| 148 | 148 |
| 149 DISALLOW_COPY_AND_ASSIGN(ControlView); | 149 DISALLOW_COPY_AND_ASSIGN(ControlView); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 bool AppNonClientFrameViewAura::IsShowingControls() const { | 304 bool AppNonClientFrameViewAura::IsShowingControls() const { |
| 305 return control_widget_ && control_widget_->IsVisible(); | 305 return control_widget_ && control_widget_->IsVisible(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void AppNonClientFrameViewAura::Restore() { | 308 void AppNonClientFrameViewAura::Restore() { |
| 309 if (control_widget_) | 309 if (control_widget_) |
| 310 control_widget_->Close(); | 310 control_widget_->Close(); |
| 311 mouse_watcher_.Stop(); | 311 mouse_watcher_.Stop(); |
| 312 frame()->Restore(); | 312 frame()->Restore(); |
| 313 } | 313 } |
| OLD | NEW |