| Index: chrome/browser/ui/views/frame/webapp_header_painter_ash.cc | 
| diff --git a/chrome/browser/ui/views/frame/webapp_header_painter_ash.cc b/chrome/browser/ui/views/frame/webapp_header_painter_ash.cc | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..670bed6c6afe429524867905559b8e6f64d9cb9f | 
| --- /dev/null | 
| +++ b/chrome/browser/ui/views/frame/webapp_header_painter_ash.cc | 
| @@ -0,0 +1,57 @@ | 
| +// Copyright 2014 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#include "chrome/browser/ui/views/frame/webapp_header_painter_ash.h" | 
| + | 
| +#include "ash/frame/caption_buttons/frame_caption_button.h" | 
| +#include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 
| +#include "grit/ash_resources.h" | 
| +#include "ui/views/widget/widget.h" | 
| + | 
| +/////////////////////////////////////////////////////////////////////////////// | 
| +// WebAppHeaderPainterAsh, public: | 
| + | 
| +WebAppHeaderPainterAsh::WebAppHeaderPainterAsh() | 
| +    : ash::DefaultHeaderPainter(), | 
| +      back_button_(NULL) { | 
| +} | 
| + | 
| +WebAppHeaderPainterAsh::~WebAppHeaderPainterAsh() { | 
| +} | 
| + | 
| +void WebAppHeaderPainterAsh::InitForWebApp( | 
| +    views::Widget* frame, | 
| +    views::View* header_view, | 
| +    ash::FrameCaptionButton* back_button, | 
| +    ash::FrameCaptionButtonContainerView* caption_button_container) { | 
| +  DefaultHeaderPainter::Init(frame, header_view, NULL, | 
| +      caption_button_container); | 
| + | 
| +  DCHECK(back_button); | 
| +  back_button_ = back_button; | 
| + | 
| +  back_button_->SetImages(ash::CAPTION_BUTTON_ICON_BACK, | 
| +                          ash::FrameCaptionButton::ANIMATE_NO, | 
| +                          IDR_AURA_WINDOW_CONTROL_ICON_BACK, | 
| +                          IDR_AURA_WINDOW_CONTROL_ICON_BACK_I, | 
| +                          IDR_AURA_WINDOW_CONTROL_BACKGROUND_H, | 
| +                          IDR_AURA_WINDOW_CONTROL_BACKGROUND_P); | 
| +} | 
| + | 
| +/////////////////////////////////////////////////////////////////////////////// | 
| +// WebAppHeaderPainter, private: | 
| + | 
| +// ash::DefaultHeaderPainter: | 
| +void WebAppHeaderPainterAsh::LayoutHeader() { | 
| +  DefaultHeaderPainter::LayoutHeader(); | 
| + | 
| +  back_button_->Layout(); | 
| +  gfx::Size back_button_size = back_button_->GetPreferredSize(); | 
| +  back_button_->SetBounds( | 
| +      0, 0, back_button_size.width(), back_button_size.height()); | 
| +} | 
| + | 
| +views::View* WebAppHeaderPainterAsh::GetViewToLeftOfTitle() const { | 
| +  return back_button_; | 
| +} | 
|  |