Chromium Code Reviews| Index: chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h |
| diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0b1480005e37a22e140962f5535691514e60ce92 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h |
| @@ -0,0 +1,80 @@ |
| +// Copyright 2015 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_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_ |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" |
| +#include "ui/views/context_menu_controller.h" |
| + |
| +namespace apps { |
| +class AppWindowFrameView; |
| +} |
| + |
| +namespace ash { |
| +class ImmersiveFullscreenController; |
| +} |
| + |
| +namespace views { |
| +class MenuRunner; |
| +} |
| + |
| +// Aura-specific parts of ChromeNativeAppWindowViews. This is used on Linux, |
| +// CrOS, and Windows and implies USE_ASH. |
| +class ChromeNativeAppWindowViewsAura : public ChromeNativeAppWindowViews, |
| + public views::ContextMenuController { |
| + public: |
| + ChromeNativeAppWindowViewsAura(); |
| + ~ChromeNativeAppWindowViewsAura() override; |
| + |
| + protected: |
| + void OnBeforeWidgetInit( |
|
tapted
2015/02/25 23:28:09
nit: ChromeNativeAppWindowViews implementation.
jackhou1
2015/02/25 23:47:30
Done.
|
| + const extensions::AppWindow::CreateParams& create_params, |
| + views::Widget::InitParams* init_params, |
| + views::Widget* widget) override; |
| + void OnBeforePanelWidgetInit(views::Widget::InitParams* init_params, |
| + views::Widget* widget) override; |
| + |
| + // ChromeNativeAppWindowViews implementation. |
| + apps::AppWindowFrameView* CreateNonStandardAppFrame() override; |
| + |
| + // ui::BaseWindow implementation. |
| + gfx::Rect GetRestoredBounds() const override; |
| + ui::WindowShowState GetRestoredState() const override; |
| + bool IsAlwaysOnTop() const override; |
| + |
| + // views::ContextMenuController implementation. |
| + void ShowContextMenuForView(views::View* source, |
| + const gfx::Point& p, |
| + ui::MenuSourceType source_type) override; |
| + |
| + // WidgetDelegate implementation. |
| + views::NonClientFrameView* CreateNonClientFrameView( |
| + views::Widget* widget) override; |
| + |
| + // NativeAppWindow implementation. |
| + void SetFullscreen(int fullscreen_types) override; |
| + void UpdateShape(scoped_ptr<SkRegion> region) override; |
| + |
| + private: |
| + FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest, |
| + ResizeInsetsWithinBounds); |
| + |
| + // Used to put non-frameless windows into immersive fullscreen on ChromeOS. In |
| + // immersive fullscreen, the window header (title bar and window controls) |
| + // slides onscreen as an overlay when the mouse is hovered at the top of the |
| + // screen. |
| + scoped_ptr<ash::ImmersiveFullscreenController> |
| + immersive_fullscreen_controller_; |
| + |
| +#if defined(OS_CHROMEOS) |
| + // Used to show the system menu. |
| + scoped_ptr<views::MenuRunner> menu_runner_; |
| +#endif |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsAura); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_ |