| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/wm/window_frame.h" | 9 #include "ash/wm/window_frame.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 11 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
| 12 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
| 13 #include "ui/views/widget/widget.h" | 13 #include "ui/views/widget/widget.h" |
| 14 | 14 |
| 15 class BrowserFrame; | 15 class BrowserFrame; |
| 16 class BrowserView; | 16 class BrowserView; |
| 17 class FrameBackgroundView; | 17 class FrameBackgroundView; |
| 18 class WindowControlButton; | 18 class WindowControlButton; |
| 19 | 19 |
| 20 class BrowserNonClientFrameViewAura : public BrowserNonClientFrameView, | 20 class BrowserNonClientFrameViewAura : public BrowserNonClientFrameView, |
| 21 public views::ButtonListener, | 21 public views::ButtonListener, |
| 22 public views::Widget::Observer, | 22 public views::Widget::Observer, |
| 23 public aura_shell::WindowFrame { | 23 public ash::WindowFrame { |
| 24 public: | 24 public: |
| 25 BrowserNonClientFrameViewAura(BrowserFrame* frame, BrowserView* browser_view); | 25 BrowserNonClientFrameViewAura(BrowserFrame* frame, BrowserView* browser_view); |
| 26 virtual ~BrowserNonClientFrameViewAura(); | 26 virtual ~BrowserNonClientFrameViewAura(); |
| 27 | 27 |
| 28 // Control the slide-in animation of the frame background. | 28 // Control the slide-in animation of the frame background. |
| 29 void ShowFrameBackground(); | 29 void ShowFrameBackground(); |
| 30 void HideFrameBackground(); | 30 void HideFrameBackground(); |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 // Returns a HitTest code. | 33 // Returns a HitTest code. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE; | 70 virtual gfx::NativeCursor GetCursor(const views::MouseEvent& event) OVERRIDE; |
| 71 | 71 |
| 72 // views::ButtonListener overrides: | 72 // views::ButtonListener overrides: |
| 73 virtual void ButtonPressed(views::Button* sender, | 73 virtual void ButtonPressed(views::Button* sender, |
| 74 const views::Event& event) OVERRIDE; | 74 const views::Event& event) OVERRIDE; |
| 75 | 75 |
| 76 // views::Widget::Observer overrides: | 76 // views::Widget::Observer overrides: |
| 77 virtual void OnWidgetActivationChanged(views::Widget* widget, | 77 virtual void OnWidgetActivationChanged(views::Widget* widget, |
| 78 bool active) OVERRIDE; | 78 bool active) OVERRIDE; |
| 79 | 79 |
| 80 // aura_shell::WindowFrame overrides: | 80 // ash::WindowFrame overrides: |
| 81 virtual void OnWindowHoverChanged(bool hovered) OVERRIDE; | 81 virtual void OnWindowHoverChanged(bool hovered) OVERRIDE; |
| 82 | 82 |
| 83 int last_hittest_code_; | 83 int last_hittest_code_; |
| 84 WindowControlButton* maximize_button_; | 84 WindowControlButton* maximize_button_; |
| 85 WindowControlButton* close_button_; | 85 WindowControlButton* close_button_; |
| 86 FrameBackgroundView* frame_background_; | 86 FrameBackgroundView* frame_background_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAura); | 88 DISALLOW_COPY_AND_ASSIGN(BrowserNonClientFrameViewAura); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ | 91 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_NON_CLIENT_FRAME_VIEW_AURA_H_ |
| OLD | NEW |