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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_
7 #pragma once
8
9 #include "ui/aura/root_window_observer.h"
10 #include "ui/gfx/rect.h"
11 #include "ui/views/widget/widget.h"
12
13 namespace aura {
14 class RootWindow;
15 }
16
17 namespace views {
18 class NativeWidgetAura;
19
20 // TODO(erg): Rename file and document
21 class DesktopNatitveWidgetHelperAura : public aura::RootWindowObserver {
22 public:
23 DesktopNatitveWidgetHelperAura(NativeWidgetAura* widget);
Ben Goodger (Google) 2012/04/17 15:42:55 explicit Native
24 ~DesktopNatitveWidgetHelperAura();
25
26 aura::RootWindow* root_window() { return root_window_.get(); }
27
28 // Called at the start of InitNativeWidget; determines whether we should
29 // set up a root_window_ for this widget.
30 void PreInitialize(const Widget::InitParams& params);
31
32 // Passes through a message to show the RootWindow, if it exists.
33 void ShowRootWindow();
34
35 // If this NativeWidgetAura has its own RootWindow, sets the position at the
36 // |root_window_|, and returns modified bounds to set the origin to
37 // zero. Otherwise, pass through in_bounds.
Ben Goodger (Google) 2012/04/17 15:42:55 Otherwise, returns |bounds|.
38 gfx::Rect ModifyAndSetBounds(gfx::Rect bounds);
39
40 // Overridden from aura::RootWindowObserver:
41 virtual void OnRootWindowResized(const aura::RootWindow* root,
42 const gfx::Size& old_size) OVERRIDE;
43 virtual void OnRootWindowHostClosed(const aura::RootWindow* root) OVERRIDE;
44
45 private:
46 // A weak pointer back to our owning widget.
47 NativeWidgetAura* widget_;
48
49 // Optionally, a RootWindow that we attach ourselves to.
50 scoped_ptr<aura::RootWindow> root_window_;
51 };
Ben Goodger (Google) 2012/04/17 15:42:55 DISALLOW_COP
52
53 } // namespace views
54
55 #endif // UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698