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

Side by Side Diff: ui/views/widget/native_widget_helper_aura.h

Issue 10409011: Aura/ash: On Desktops, use a aura::client to resolve screen coordinates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge with trunk. Created 8 years, 7 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
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_ 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_ 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/views/views_export.h" 9 #include "ui/views/views_export.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 // A special delegate that encapsulates all logic for use of NativeWidgetAura 14 // A special delegate that encapsulates all logic for use of NativeWidgetAura
15 // on the desktop. 15 // on the desktop.
16 class VIEWS_EXPORT NativeWidgetHelperAura { 16 class VIEWS_EXPORT NativeWidgetHelperAura {
17 public: 17 public:
18 virtual ~NativeWidgetHelperAura() {} 18 virtual ~NativeWidgetHelperAura() {}
19 19
20 // Called at the start of InitNativeWidget; determines whether we should 20 // Called at the start of InitNativeWidget; determines whether we should
21 // set up a root_window_ for this widget. 21 // set up a root_window_ for this widget/window pair.
22 virtual void PreInitialize(const Widget::InitParams& params) = 0; 22 virtual void PreInitialize(aura::Window* window,
23 const Widget::InitParams& params) = 0;
23 24
24 // Called at the end of InitNativeWidget; i.e. after the NativeWidgetAura's 25 // Called at the end of InitNativeWidget; i.e. after the NativeWidgetAura's
25 // aura::Window has been initialized. 26 // aura::Window has been initialized.
26 virtual void PostInitialize() = 0; 27 virtual void PostInitialize() = 0;
27 28
28 // Passes through a message to show the RootWindow, if it exists. 29 // Passes through a message to show the RootWindow, if it exists.
29 virtual void ShowRootWindow() = 0; 30 virtual void ShowRootWindow() = 0;
30 31
31 // If we own a RootWindow, return it. Otherwise NULL. 32 // If we own a RootWindow, return it. Otherwise NULL.
32 virtual aura::RootWindow* GetRootWindow() = 0; 33 virtual aura::RootWindow* GetRootWindow() = 0;
33 34
34 // If this NativeWidgetAura has its own RootWindow, sets the position at the 35 // If this NativeWidgetAura has its own RootWindow, sets the position at the
35 // |root_window_|, and returns modified bounds to set the origin to 36 // |root_window_|, and returns modified bounds to set the origin to
36 // zero. Otherwise, pass through in_bounds. 37 // zero. Otherwise, pass through in_bounds.
37 virtual gfx::Rect ModifyAndSetBounds(const gfx::Rect& bounds) = 0; 38 virtual gfx::Rect ModifyAndSetBounds(const gfx::Rect& bounds) = 0;
38
39 // Takes bounds relative to the RootWindow and changes them to be relative to
40 // the screen.
41 virtual gfx::Rect ChangeRootWindowBoundsToScreenBounds(
42 const gfx::Rect& bounds) = 0;
43 }; 39 };
44 40
45 } // namespace views 41 } // namespace views
46 42
47 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_ 43 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698