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

Side by Side Diff: ash/wm/panels/panel_frame_view.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
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/panels/panel_frame_view.h" 5 #include "ash/wm/panels/panel_frame_view.h"
6 6
7 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" 7 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h"
8 #include "ash/wm/frame_border_hit_test_controller.h" 8 #include "ash/wm/frame_border_hit_test_controller.h"
9 #include "ash/wm/header_painter.h" 9 #include "ash/wm/header_painter.h"
10 #include "grit/ash_resources.h" 10 #include "grit/ash_resources.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return FrameBorderHitTestController::NonClientHitTest(this, 110 return FrameBorderHitTestController::NonClientHitTest(this,
111 header_painter_.get(), point); 111 header_painter_.get(), point);
112 } 112 }
113 113
114 void PanelFrameView::OnPaint(gfx::Canvas* canvas) { 114 void PanelFrameView::OnPaint(gfx::Canvas* canvas) {
115 if (!header_painter_) 115 if (!header_painter_)
116 return; 116 return;
117 bool paint_as_active = ShouldPaintAsActive(); 117 bool paint_as_active = ShouldPaintAsActive();
118 int theme_frame_id = 0; 118 int theme_frame_id = 0;
119 if (paint_as_active) 119 if (paint_as_active)
120 theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_ACTIVE; 120 theme_frame_id = IDR_AURA_BROWSER_WINDOW_HEADER_BASE_RESTORED_ACTIVE;
121 else 121 else
122 theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_INACTIVE; 122 theme_frame_id = IDR_AURA_BROWSER_WINDOW_HEADER_BASE_RESTORED_INACTIVE;
123 123
124 header_painter_->PaintHeader( 124 header_painter_->PaintHeader(
125 canvas, 125 canvas,
126 theme_frame_id, 126 theme_frame_id,
127 0); 127 0);
128 header_painter_->PaintTitleBar(canvas, title_font_list_); 128 header_painter_->PaintTitleBar(canvas, title_font_list_);
129 header_painter_->PaintHeaderContentSeparator(canvas); 129 header_painter_->PaintHeaderContentSeparator(canvas);
130 } 130 }
131 131
132 gfx::Rect PanelFrameView::GetBoundsForClientView() const { 132 gfx::Rect PanelFrameView::GetBoundsForClientView() const {
133 if (!header_painter_) 133 if (!header_painter_)
134 return bounds(); 134 return bounds();
135 return HeaderPainter::GetBoundsForClientView( 135 return HeaderPainter::GetBoundsForClientView(
136 NonClientTopBorderHeight(), bounds()); 136 NonClientTopBorderHeight(), bounds());
137 } 137 }
138 138
139 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( 139 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds(
140 const gfx::Rect& client_bounds) const { 140 const gfx::Rect& client_bounds) const {
141 if (!header_painter_) 141 if (!header_painter_)
142 return client_bounds; 142 return client_bounds;
143 return HeaderPainter::GetWindowBoundsForClientBounds( 143 return HeaderPainter::GetWindowBoundsForClientBounds(
144 NonClientTopBorderHeight(), client_bounds); 144 NonClientTopBorderHeight(), client_bounds);
145 } 145 }
146 146
147 } // namespace ash 147 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/header_painter.cc ('k') | chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698