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

Side by Side Diff: ash/wm/header_painter.cc

Issue 175893004: Land image assets for https://codereview.chromium.org/148003003/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « ash/wm/custom_frame_view_ash.cc ('k') | ash/wm/panels/panel_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/wm/header_painter.h" 5 #include "ash/wm/header_painter.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" 9 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
10 #include "base/logging.h" // DCHECK 10 #include "base/logging.h" // DCHECK
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // window_icon may be NULL. 163 // window_icon may be NULL.
164 DCHECK(caption_button_container); 164 DCHECK(caption_button_container);
165 style_ = style; 165 style_ = style;
166 frame_ = frame; 166 frame_ = frame;
167 header_view_ = header_view; 167 header_view_ = header_view;
168 window_icon_ = window_icon; 168 window_icon_ = window_icon;
169 caption_button_container_ = caption_button_container; 169 caption_button_container_ = caption_button_container;
170 170
171 // Window frame image parts. 171 // Window frame image parts.
172 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 172 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
173 top_left_corner_ = 173 top_left_corner_ = rb.GetImageNamed(
174 rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_TOP_LEFT).ToImageSkia(); 174 IDR_AURA_BROWSER_WINDOW_HEADER_SHADE_TOP_LEFT).ToImageSkia();
175 top_edge_ = 175 top_edge_ = rb.GetImageNamed(
176 rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_TOP).ToImageSkia(); 176 IDR_AURA_BROWSER_WINDOW_HEADER_SHADE_TOP).ToImageSkia();
177 top_right_corner_ = 177 top_right_corner_ = rb.GetImageNamed(
178 rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_TOP_RIGHT).ToImageSkia(); 178 IDR_AURA_BROWSER_WINDOW_HEADER_SHADE_TOP_RIGHT).ToImageSkia();
179 header_left_edge_ = 179 header_left_edge_ = rb.GetImageNamed(
180 rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_LEFT).ToImageSkia(); 180 IDR_AURA_BROWSER_WINDOW_HEADER_SHADE_LEFT).ToImageSkia();
181 header_right_edge_ = 181 header_right_edge_ = rb.GetImageNamed(
182 rb.GetImageNamed(IDR_AURA_WINDOW_HEADER_SHADE_RIGHT).ToImageSkia(); 182 IDR_AURA_BROWSER_WINDOW_HEADER_SHADE_RIGHT).ToImageSkia();
183 } 183 }
184 184
185 // static 185 // static
186 gfx::Rect HeaderPainter::GetBoundsForClientView( 186 gfx::Rect HeaderPainter::GetBoundsForClientView(
187 int header_height, 187 int header_height,
188 const gfx::Rect& window_bounds) { 188 const gfx::Rect& window_bounds) {
189 gfx::Rect client_bounds(window_bounds); 189 gfx::Rect client_bounds(window_bounds);
190 client_bounds.Inset(0, header_height, 0, 0); 190 client_bounds.Inset(0, header_height, 0, 0);
191 return client_bounds; 191 return client_bounds;
192 } 192 }
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 int title_y = 551 int title_y =
552 GetCaptionButtonContainerCenterY() - title_font_list.GetHeight() / 2; 552 GetCaptionButtonContainerCenterY() - title_font_list.GetHeight() / 2;
553 return gfx::Rect( 553 return gfx::Rect(
554 title_x, 554 title_x,
555 std::max(0, title_y), 555 std::max(0, title_y),
556 std::max(0, caption_button_container_->x() - kTitleLogoSpacing - title_x), 556 std::max(0, caption_button_container_->x() - kTitleLogoSpacing - title_x),
557 title_font_list.GetHeight()); 557 title_font_list.GetHeight());
558 } 558 }
559 559
560 } // namespace ash 560 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/custom_frame_view_ash.cc ('k') | ash/wm/panels/panel_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698