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 "base/debug/stack_trace.h" | 7 #include "base/debug/stack_trace.h" |
8 #include "chrome/browser/ui/views/frame/browser_frame.h" | 8 #include "chrome/browser/ui/views/frame/browser_frame.h" |
9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
10 #include "grit/generated_resources.h" // Accessibility names | 10 #include "grit/generated_resources.h" // Accessibility names |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 private: | 136 private: |
137 // Sets images whose ids are passed in for each of the respective states | 137 // Sets images whose ids are passed in for each of the respective states |
138 // of |button|. | 138 // of |button|. |
139 void SetButtonImages(views::ImageButton* button, int normal_bitmap_id, | 139 void SetButtonImages(views::ImageButton* button, int normal_bitmap_id, |
140 int hot_bitmap_id, int pushed_bitmap_id) { | 140 int hot_bitmap_id, int pushed_bitmap_id) { |
141 ui::ThemeProvider* theme_provider = GetThemeProvider(); | 141 ui::ThemeProvider* theme_provider = GetThemeProvider(); |
142 button->SetImage(views::CustomButton::BS_NORMAL, | 142 button->SetImage(views::CustomButton::BS_NORMAL, |
143 theme_provider->GetBitmapNamed(normal_bitmap_id)); | 143 theme_provider->GetImageSkiaNamed(normal_bitmap_id)); |
144 button->SetImage(views::CustomButton::BS_HOT, | 144 button->SetImage(views::CustomButton::BS_HOT, |
145 theme_provider->GetBitmapNamed(hot_bitmap_id)); | 145 theme_provider->GetImageSkiaNamed(hot_bitmap_id)); |
146 button->SetImage(views::CustomButton::BS_PUSHED, | 146 button->SetImage(views::CustomButton::BS_PUSHED, |
147 theme_provider->GetBitmapNamed(pushed_bitmap_id)); | 147 theme_provider->GetImageSkiaNamed(pushed_bitmap_id)); |
148 } | 148 } |
149 | 149 |
150 AppNonClientFrameViewAura* owner_; | 150 AppNonClientFrameViewAura* owner_; |
151 views::ImageButton* close_button_; | 151 views::ImageButton* close_button_; |
152 views::ImageButton* restore_button_; | 152 views::ImageButton* restore_button_; |
153 const SkBitmap* control_base_; | 153 const SkBitmap* control_base_; |
154 const SkBitmap* separator_; | 154 const SkBitmap* separator_; |
155 const SkBitmap* shadow_; | 155 const SkBitmap* shadow_; |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(ControlView); | 157 DISALLOW_COPY_AND_ASSIGN(ControlView); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 bool AppNonClientFrameViewAura::IsShowingControls() const { | 312 bool AppNonClientFrameViewAura::IsShowingControls() const { |
313 return control_widget_ && control_widget_->IsVisible(); | 313 return control_widget_ && control_widget_->IsVisible(); |
314 } | 314 } |
315 | 315 |
316 void AppNonClientFrameViewAura::Restore() { | 316 void AppNonClientFrameViewAura::Restore() { |
317 if (control_widget_) | 317 if (control_widget_) |
318 control_widget_->Close(); | 318 control_widget_->Close(); |
319 mouse_watcher_.Stop(); | 319 mouse_watcher_.Stop(); |
320 frame()->Restore(); | 320 frame()->Restore(); |
321 } | 321 } |
OLD | NEW |