Index: chrome/browser/ui/views/frame/non_client_frame_view_switcher_ash.h |
diff --git a/chrome/browser/ui/views/frame/non_client_frame_view_switcher_ash.h b/chrome/browser/ui/views/frame/non_client_frame_view_switcher_ash.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e61654d550aa1ea4c580ec011129393ccb102f46 |
--- /dev/null |
+++ b/chrome/browser/ui/views/frame/non_client_frame_view_switcher_ash.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2013 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_NON_CLIENT_FRAME_VIEW_SWITCHER_ASH_H_ |
+#define CHROME_BROWSER_UI_VIEWS_FRAME_NON_CLIENT_FRAME_VIEW_SWITCHER_ASH_H_ |
+ |
+#include "ash/wm/window_state_observer.h" |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "ui/aura/window_observer.h" |
+ |
+namespace aura { |
+class Window; |
+} |
+ |
+namespace views { |
+class Widget; |
+} |
+ |
+// Class which switches a widget's non client view when the widget's maximized |
+// state changes. |
+class NonClientFrameViewSwitcherAsh : public aura::WindowObserver, |
+ public ash::wm::WindowStateObserver { |
+ public: |
+ NonClientFrameViewSwitcherAsh(views::Widget* frame_widget, |
+ aura::Window* frame_window); |
+ virtual ~NonClientFrameViewSwitcherAsh(); |
+ |
+ private: |
+ // aura::WindowObserver override: |
+ virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
+ |
+ // ash::wm::WindowStateObserver override: |
+ virtual void OnWindowShowTypeChanged(ash::wm::WindowState* window_state, |
+ ash::wm::WindowShowType type) OVERRIDE; |
+ |
+ // The widget whose non client view is to be switched when its maximized state |
+ // changes. |
+ views::Widget* frame_widget_; |
+ |
+ // |frame_widget_|'s aura::Window. |
+ aura::Window* frame_window_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NonClientFrameViewSwitcherAsh); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_FRAME_NON_CLIENT_FRAME_VIEW_SWITCHER_ASH_H_ |