 Chromium Code Reviews
 Chromium Code Reviews 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
    
  
    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| Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h | 
| diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h | 
| index 70c984d21a2db1552df8d059266de2e430358343..074ada8dd57885873dcd8140ab898f880ded0fc4 100644 | 
| --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h | 
| +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h | 
| @@ -8,6 +8,7 @@ | 
| #include "ash/shell_observer.h" | 
| #include "base/gtest_prod_util.h" | 
| #include "base/memory/scoped_ptr.h" | 
| +#include "chrome/browser/command_observer.h" | 
| #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 
| #include "chrome/browser/ui/views/tab_icon_view_model.h" | 
| @@ -15,6 +16,7 @@ class TabIconView; | 
| namespace ash { | 
| class FrameBorderHitTestController; | 
| +class FrameCaptionButton; | 
| class FrameCaptionButtonContainerView; | 
| class HeaderPainter; | 
| } | 
| @@ -23,10 +25,11 @@ class ImageButton; | 
| class ToggleImageButton; | 
| } | 
| -class BrowserNonClientFrameViewAsh | 
| - : public BrowserNonClientFrameView, | 
| - public ash::ShellObserver, | 
| - public chrome::TabIconViewModel { | 
| +class BrowserNonClientFrameViewAsh : public BrowserNonClientFrameView, | 
| + public ash::ShellObserver, | 
| + public chrome::TabIconViewModel, | 
| + public CommandObserver, | 
| + public views::ButtonListener { | 
| 
pkotwicz
2014/08/14 01:59:44
Shouldn't we be including ui/views/controls/button
 
benwells
2014/08/14 04:42:50
Done.
 | 
| public: | 
| static const char kViewClassName[]; | 
| @@ -68,6 +71,13 @@ class BrowserNonClientFrameViewAsh | 
| virtual bool ShouldTabIconViewAnimate() const OVERRIDE; | 
| virtual gfx::ImageSkia GetFaviconForTabIconView() OVERRIDE; | 
| + // CommandObserver: | 
| + virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE; | 
| + | 
| + // views::ButtonListener: | 
| + virtual void ButtonPressed(views::Button* sender, | 
| + const ui::Event& event) OVERRIDE; | 
| + | 
| private: | 
| FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, WindowHeader); | 
| FRIEND_TEST_ALL_PREFIXES(BrowserNonClientFrameViewAshTest, | 
| @@ -98,6 +108,11 @@ class BrowserNonClientFrameViewAsh | 
| // scheme than browser windows. | 
| bool UsePackagedAppHeaderStyle() const; | 
| + // Returns true if the header should be painted with a WebApp header style. | 
| + // The WebApp header style has a back button and title along with the usual | 
| + // accoutrements. | 
| + bool UseWebAppHeaderStyle() const; | 
| + | 
| // Layout the incognito icon. | 
| void LayoutAvatar(); | 
| @@ -115,9 +130,15 @@ class BrowserNonClientFrameViewAsh | 
| // the packaged app header style. | 
| void PaintContentEdge(gfx::Canvas* canvas); | 
| + // Update the state of the back button. | 
| + void UpdateBackButtonState(bool enabled); | 
| + | 
| // View which contains the window controls. | 
| ash::FrameCaptionButtonContainerView* caption_button_container_; | 
| + // View which contains the back button for WebApp style header. | 
| 
pkotwicz
2014/08/14 01:59:44
How about: "The back button for the web app style
 
benwells
2014/08/14 04:42:50
Done.
 | 
| + ash::FrameCaptionButton* web_app_back_button_; | 
| + | 
| // For popups, the window icon. | 
| TabIconView* window_icon_; |