Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h

Issue 947343003: Split out Ash/Aura parts of ChromeNativeAppWindowViews. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
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_
7
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"
11
12 namespace apps {
13 class AppWindowFrameView;
14 }
15
16 namespace ash {
17 class ImmersiveFullscreenController;
18 }
19
20 namespace views {
21 class MenuRunner;
22 }
23
24 class ChromeNativeAppWindowViewsAura : public ChromeNativeAppWindowViews,
tapted 2015/02/25 05:54:35 nit: comment for this class
jackhou1 2015/02/25 22:57:52 Done.
25 public views::ContextMenuController {
26 public:
27 ChromeNativeAppWindowViewsAura();
28 ~ChromeNativeAppWindowViewsAura() override;
29
30 protected:
31 // ChromeNativeAppWindowViews implementation.
32 gfx::NativeView GetImeWindowContainer() override;
33 gfx::Rect GetPanelWindowInitialBounds(gfx::Size preferred_size_) override;
34 apps::AppWindowFrameView* CreateNonStandardAppFrame() override;
35
36 // ui::BaseWindow implementation.
37 gfx::Rect GetRestoredBounds() const override;
38 ui::WindowShowState GetRestoredState() const override;
39 bool IsAlwaysOnTop() const override;
40
41 // views::ContextMenuController implementation.
42 void ShowContextMenuForView(views::View* source,
43 const gfx::Point& p,
44 ui::MenuSourceType source_type) override;
45
46 // WidgetDelegate implementation.
47 views::NonClientFrameView* CreateNonClientFrameView(
48 views::Widget* widget) override;
49
50 // NativeAppWindow implementation.
51 void SetFullscreen(int fullscreen_types) override;
52 void UpdateShape(scoped_ptr<SkRegion> region) override;
53
54 private:
55 FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest,
56 ResizeInsetsWithinBounds);
57
58 // Used to put non-frameless windows into immersive fullscreen on ChromeOS. In
59 // immersive fullscreen, the window header (title bar and window controls)
60 // slides onscreen as an overlay when the mouse is hovered at the top of the
61 // screen.
62 scoped_ptr<ash::ImmersiveFullscreenController>
63 immersive_fullscreen_controller_;
64
65 #if defined(OS_CHROMEOS)
66 // Used to show the system menu.
67 scoped_ptr<views::MenuRunner> menu_runner_;
68 #endif
69
70 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsAura);
71 };
72
73 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698