Chromium Code Reviews| Index: chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h |
| diff --git a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..547539b866075ca1ed1da504f871a0864dac6bf4 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.h |
| @@ -0,0 +1,76 @@ |
| +// Copyright (c) 2012 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_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ |
| +#pragma once |
| + |
| +#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" |
| +#include "ui/base/animation/animation_delegate.h" |
| +#include "ui/views/controls/button/button.h" |
| +#include "ui/views/mouse_watcher.h" |
| + |
| +namespace aura { |
| +class Window; |
| +} |
| + |
| +namespace ui { |
| +class SlideAnimation; |
| +} |
| + |
| +// NonClientFrameViewAura implementation for apps. |
| +class AppNonClientFrameViewAura : public BrowserNonClientFrameView, |
| + public ui::AnimationDelegate, |
| + public views::MouseWatcherListener { |
| + public: |
| + explicit AppNonClientFrameViewAura( |
| + BrowserFrame* frame, BrowserView* browser_view); |
|
sky
2012/02/09 01:04:17
no explicit
DaveMoore
2012/02/10 23:05:55
Done.
|
| + virtual ~AppNonClientFrameViewAura(); |
| + |
| + // NonClientFrameView: |
| + virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
| + virtual gfx::Rect GetWindowBoundsForClientBounds( |
| + const gfx::Rect& client_bounds) const OVERRIDE; |
| + virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
| + virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) |
| + OVERRIDE; |
| + virtual void ResetWindowControls() OVERRIDE; |
| + virtual void UpdateWindowIcon() OVERRIDE; |
| + |
| + // BrowserNonClientFrameView: |
| + virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const |
| + OVERRIDE; |
|
sky
2012/02/09 01:04:17
Similar to const, don't leave OVERRIDE on a line b
DaveMoore
2012/02/10 23:05:55
Done.
|
| + virtual int GetHorizontalTabStripVerticalOffset(bool restored) const |
| + OVERRIDE; |
| + virtual void UpdateThrobber(bool running) OVERRIDE; |
| + |
| + // View: |
| + virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; |
| + |
| + // ui::AnimationDelegate. |
| + virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| + |
| + // views::MouseWatcherListener. |
| + virtual void MouseMovedOutOfHost() OVERRIDE; |
| + |
| + // Close the app window. |
| + void Close(); |
| + // Restore the app window (will result in switching the frame_view back). |
|
sky
2012/02/09 01:04:17
nit: newline between 58 and 59
DaveMoore
2012/02/10 23:05:55
Done.
|
| + void Restore(); |
| + |
| + private: |
| + class ControlView; |
| + class Host; |
| + |
| + gfx::Rect GetControlBounds() const; |
| + |
| + ControlView* control_view_; |
|
sky
2012/02/09 01:04:17
Add descriptions for these.
DaveMoore
2012/02/10 23:05:55
Done.
|
| + views::Widget* control_widget_; |
| + scoped_ptr<ui::SlideAnimation> show_animation_; |
| + views::MouseWatcher mouse_watcher_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AppNonClientFrameViewAura); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_FRAME_APP_NON_CLIENT_FRAME_VIEW_AURA_H_ |