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

Unified Diff: ui/views/widget/desktop_native_widget_helper_aura.h

Issue 10081022: Aura/ash split: Remove hacks and get chrome linking without ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hopefully fix macro problem. Created 8 years, 8 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: ui/views/widget/desktop_native_widget_helper_aura.h
diff --git a/ui/views/widget/desktop_native_widget_helper_aura.h b/ui/views/widget/desktop_native_widget_helper_aura.h
new file mode 100644
index 0000000000000000000000000000000000000000..ff556216b22edd15269b4a9bc8d20caffa95d9a2
--- /dev/null
+++ b/ui/views/widget/desktop_native_widget_helper_aura.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2012 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 UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_
+#define UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_
+#pragma once
+
+#include "ui/aura/root_window_observer.h"
+#include "ui/gfx/rect.h"
+#include "ui/views/widget/widget.h"
+
+namespace aura {
+class RootWindow;
+}
+
+namespace views {
+class NativeWidgetAura;
+
+// TODO(erg): Rename file and document
+class DesktopNatitveWidgetHelperAura : public aura::RootWindowObserver {
+ public:
+ DesktopNatitveWidgetHelperAura(NativeWidgetAura* widget);
Ben Goodger (Google) 2012/04/17 15:42:55 explicit Native
+ ~DesktopNatitveWidgetHelperAura();
+
+ aura::RootWindow* root_window() { return root_window_.get(); }
+
+ // Called at the start of InitNativeWidget; determines whether we should
+ // set up a root_window_ for this widget.
+ void PreInitialize(const Widget::InitParams& params);
+
+ // Passes through a message to show the RootWindow, if it exists.
+ void ShowRootWindow();
+
+ // If this NativeWidgetAura has its own RootWindow, sets the position at the
+ // |root_window_|, and returns modified bounds to set the origin to
+ // zero. Otherwise, pass through in_bounds.
Ben Goodger (Google) 2012/04/17 15:42:55 Otherwise, returns |bounds|.
+ gfx::Rect ModifyAndSetBounds(gfx::Rect bounds);
+
+ // Overridden from aura::RootWindowObserver:
+ virtual void OnRootWindowResized(const aura::RootWindow* root,
+ const gfx::Size& old_size) OVERRIDE;
+ virtual void OnRootWindowHostClosed(const aura::RootWindow* root) OVERRIDE;
+
+ private:
+ // A weak pointer back to our owning widget.
+ NativeWidgetAura* widget_;
+
+ // Optionally, a RootWindow that we attach ourselves to.
+ scoped_ptr<aura::RootWindow> root_window_;
+};
Ben Goodger (Google) 2012/04/17 15:42:55 DISALLOW_COP
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_

Powered by Google App Engine
This is Rietveld 408576698