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

Side by Side Diff: ash/wm/custom_frame_view_ash.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/system/chromeos/network/tray_sms.cc ('k') | ash/wm/header_painter.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 (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 "ash/wm/custom_frame_view_ash.h" 5 #include "ash/wm/custom_frame_view_ash.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" 8 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
9 #include "ash/wm/caption_buttons/frame_maximize_button.h" 9 #include "ash/wm/caption_buttons/frame_maximize_button.h"
10 #include "ash/wm/caption_buttons/frame_maximize_button_observer.h" 10 #include "ash/wm/caption_buttons/frame_maximize_button_observer.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 259
260 void CustomFrameViewAsh::HeaderView::Layout() { 260 void CustomFrameViewAsh::HeaderView::Layout() {
261 header_painter_->LayoutHeader(); 261 header_painter_->LayoutHeader();
262 header_painter_->set_header_height(GetPreferredHeight()); 262 header_painter_->set_header_height(GetPreferredHeight());
263 } 263 }
264 264
265 void CustomFrameViewAsh::HeaderView::OnPaint(gfx::Canvas* canvas) { 265 void CustomFrameViewAsh::HeaderView::OnPaint(gfx::Canvas* canvas) {
266 int theme_image_id = 0; 266 int theme_image_id = 0;
267 if (frame_->IsMaximized() || frame_->IsFullscreen()) 267 if (frame_->IsMaximized() || frame_->IsFullscreen())
268 theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_MINIMAL; 268 theme_image_id = IDR_AURA_BROWSER_WINDOW_HEADER_BASE_MAXIMIZED;
269 else if (frame_->non_client_view()->frame_view()->ShouldPaintAsActive()) 269 else if (frame_->non_client_view()->frame_view()->ShouldPaintAsActive())
270 theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_ACTIVE; 270 theme_image_id = IDR_AURA_BROWSER_WINDOW_HEADER_BASE_RESTORED_ACTIVE;
271 else 271 else
272 theme_image_id = IDR_AURA_WINDOW_HEADER_BASE_INACTIVE; 272 theme_image_id = IDR_AURA_BROWSER_WINDOW_HEADER_BASE_RESTORED_INACTIVE;
273 273
274 header_painter_->PaintHeader( 274 header_painter_->PaintHeader(
275 canvas, 275 canvas,
276 theme_image_id, 276 theme_image_id,
277 0); 277 0);
278 header_painter_->PaintTitleBar(canvas, GetTitleFontList()); 278 header_painter_->PaintTitleBar(canvas, GetTitleFontList());
279 header_painter_->PaintHeaderContentSeparator(canvas); 279 header_painter_->PaintHeaderContentSeparator(canvas);
280 } 280 }
281 281
282 void CustomFrameViewAsh::HeaderView::OnImmersiveRevealStarted() { 282 void CustomFrameViewAsh::HeaderView::OnImmersiveRevealStarted() {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 } 496 }
497 497
498 //////////////////////////////////////////////////////////////////////////////// 498 ////////////////////////////////////////////////////////////////////////////////
499 // CustomFrameViewAsh, private: 499 // CustomFrameViewAsh, private:
500 500
501 int CustomFrameViewAsh::NonClientTopBorderHeight() const { 501 int CustomFrameViewAsh::NonClientTopBorderHeight() const {
502 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); 502 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight();
503 } 503 }
504 504
505 } // namespace ash 505 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/tray_sms.cc ('k') | ash/wm/header_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698