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

Unified Diff: chrome/browser/ui/views/frame/webapp_header_painter_ash.h

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: Feedback 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/webapp_header_painter_ash.h
diff --git a/chrome/browser/ui/views/frame/webapp_header_painter_ash.h b/chrome/browser/ui/views/frame/webapp_header_painter_ash.h
new file mode 100644
index 0000000000000000000000000000000000000000..6087d418929f93dc72992260c208c841451d2c9a
--- /dev/null
+++ b/chrome/browser/ui/views/frame/webapp_header_painter_ash.h
@@ -0,0 +1,43 @@
+// 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.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_WEBAPP_HEADER_PAINTER_ASH_H_
+#define CHROME_BROWSER_UI_VIEWS_FRAME_WEBAPP_HEADER_PAINTER_ASH_H_
+
+#include "ash/frame/default_header_painter.h"
+
+namespace ash {
+class FrameCaptionButton;
+class FrameCaptionButtonContainerView;
+}
+
+namespace views {
+class View;
+class Widget;
+}
+
+// Helper class for painting the WebApp style window header.
+class WebAppHeaderPainterAsh : public ash::DefaultHeaderPainter {
+ public:
+ WebAppHeaderPainterAsh();
+ virtual ~WebAppHeaderPainterAsh();
+
+ // WebAppHeaderPainter does not take ownership of any of the parameters.
+ void InitForWebApp(
+ views::Widget* frame,
+ views::View* header_view,
+ ash::FrameCaptionButton* back_button,
+ ash::FrameCaptionButtonContainerView* caption_button_container);
+
+ private:
+ // DefaultHeaderPainter overrides:
+ virtual void LayoutHeader() OVERRIDE;
+ virtual views::View* GetViewToLeftOfTitle() const OVERRIDE;
+
+ ash::FrameCaptionButton* back_button_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebAppHeaderPainterAsh);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_FRAME_WEBAPP_HEADER_PAINTER_ASH_H_

Powered by Google App Engine
This is Rietveld 408576698