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

Side by Side Diff: ash/wm/panels/panel_frame_view.cc

Issue 441803004: Introduce new WebApp header style for hosted apps and fizzy apps on ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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/frame/caption_buttons/frame_caption_button_container_view.h" 7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
8 #include "ash/frame/default_header_painter.h" 8 #include "ash/frame/default_header_painter.h"
9 #include "ash/frame/frame_border_hit_test_controller.h" 9 #include "ash/frame/frame_border_hit_test_controller.h"
10 #include "ui/base/hit_test.h" 10 #include "ui/base/hit_test.h"
(...skipping 25 matching lines...) Expand all
36 return kViewClassName; 36 return kViewClassName;
37 } 37 }
38 38
39 void PanelFrameView::InitHeaderPainter() { 39 void PanelFrameView::InitHeaderPainter() {
40 header_painter_.reset(new DefaultHeaderPainter); 40 header_painter_.reset(new DefaultHeaderPainter);
41 41
42 caption_button_container_ = new FrameCaptionButtonContainerView(frame_, 42 caption_button_container_ = new FrameCaptionButtonContainerView(frame_,
43 FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); 43 FrameCaptionButtonContainerView::MINIMIZE_ALLOWED);
44 AddChildView(caption_button_container_); 44 AddChildView(caption_button_container_);
45 45
46 header_painter_->Init(frame_, this, caption_button_container_);
47
46 if (frame_->widget_delegate()->ShouldShowWindowIcon()) { 48 if (frame_->widget_delegate()->ShouldShowWindowIcon()) {
47 window_icon_ = new views::ImageView(); 49 window_icon_ = new views::ImageView();
48 AddChildView(window_icon_); 50 AddChildView(window_icon_);
51 header_painter_->UpdateLeftHeaderView(window_icon_);
49 } 52 }
50
51 header_painter_->Init(frame_, this, window_icon_, caption_button_container_);
52 } 53 }
53 54
54 int PanelFrameView::NonClientTopBorderHeight() const { 55 int PanelFrameView::NonClientTopBorderHeight() const {
55 if (!header_painter_) 56 if (!header_painter_)
56 return 0; 57 return 0;
57 return header_painter_->GetHeaderHeightForPainting(); 58 return header_painter_->GetHeaderHeightForPainting();
58 } 59 }
59 60
60 gfx::Size PanelFrameView::GetMinimumSize() const { 61 gfx::Size PanelFrameView::GetMinimumSize() const {
61 if (!header_painter_) 62 if (!header_painter_)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 122 }
122 123
123 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( 124 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds(
124 const gfx::Rect& client_bounds) const { 125 const gfx::Rect& client_bounds) const {
125 gfx::Rect window_bounds = client_bounds; 126 gfx::Rect window_bounds = client_bounds;
126 window_bounds.Inset(0, -NonClientTopBorderHeight(), 0, 0); 127 window_bounds.Inset(0, -NonClientTopBorderHeight(), 0, 0);
127 return window_bounds; 128 return window_bounds;
128 } 129 }
129 130
130 } // namespace ash 131 } // namespace ash
OLDNEW
« no previous file with comments | « ash/resources/default_200_percent/common/window_control_icon_back_inactive.png ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698