Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / views / apps / chrome_native_app_window_views_aura.h
bloba8ad016205ecd8c440c796547c50696f2d38deef
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_
6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
10 #include "ui/views/context_menu_controller.h"
12 namespace apps {
13 class AppWindowFrameView;
16 namespace ash {
17 class ImmersiveFullscreenController;
20 namespace views {
21 class MenuRunner;
24 // Aura-specific parts of ChromeNativeAppWindowViews. This is used on Linux,
25 // CrOS, and Windows and implies USE_ASH.
26 class ChromeNativeAppWindowViewsAura : public ChromeNativeAppWindowViews,
27 public views::ContextMenuController {
28 public:
29 ChromeNativeAppWindowViewsAura();
30 ~ChromeNativeAppWindowViewsAura() override;
32 protected:
33 // ChromeNativeAppWindowViews implementation.
34 void OnBeforeWidgetInit(
35 const extensions::AppWindow::CreateParams& create_params,
36 views::Widget::InitParams* init_params,
37 views::Widget* widget) override;
38 void OnBeforePanelWidgetInit(views::Widget::InitParams* init_params,
39 views::Widget* widget) override;
40 apps::AppWindowFrameView* CreateNonStandardAppFrame() override;
42 // ui::BaseWindow implementation.
43 gfx::Rect GetRestoredBounds() const override;
44 ui::WindowShowState GetRestoredState() const override;
45 bool IsAlwaysOnTop() const override;
47 // views::ContextMenuController implementation.
48 void ShowContextMenuForView(views::View* source,
49 const gfx::Point& p,
50 ui::MenuSourceType source_type) override;
52 // WidgetDelegate implementation.
53 views::NonClientFrameView* CreateNonClientFrameView(
54 views::Widget* widget) override;
56 // NativeAppWindow implementation.
57 void SetFullscreen(int fullscreen_types) override;
58 void UpdateShape(scoped_ptr<SkRegion> region) override;
60 private:
61 FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest,
62 ResizeInsetsWithinBounds);
64 // Used to put non-frameless windows into immersive fullscreen on ChromeOS. In
65 // immersive fullscreen, the window header (title bar and window controls)
66 // slides onscreen as an overlay when the mouse is hovered at the top of the
67 // screen.
68 scoped_ptr<ash::ImmersiveFullscreenController>
69 immersive_fullscreen_controller_;
71 #if defined(OS_CHROMEOS)
72 // Used to show the system menu.
73 scoped_ptr<views::MenuRunner> menu_runner_;
74 #endif
76 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsAura);
79 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_