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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
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..06d9b952fc11f744d16bdb5ec5e788c47c128f7b
--- /dev/null
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h
@@ -0,0 +1,73 @@
+// 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;
+}
+
+class ChromeNativeAppWindowViewsAura : public ChromeNativeAppWindowViews,
tapted 2015/02/25 05:54:35 nit: comment for this class
jackhou1 2015/02/25 22:57:52 Done.
+ public views::ContextMenuController {
+ public:
+ ChromeNativeAppWindowViewsAura();
+ ~ChromeNativeAppWindowViewsAura() override;
+
+ protected:
+ // ChromeNativeAppWindowViews implementation.
+ gfx::NativeView GetImeWindowContainer() override;
+ gfx::Rect GetPanelWindowInitialBounds(gfx::Size preferred_size_) override;
+ 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_

Powered by Google App Engine
This is Rietveld 408576698