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

Side by Side Diff: chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc

Issue 10382144: Change SetImage, SetBackground, and SetToggledImage to take in a gfx::ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.cc ('k') | chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698