| OLD | NEW |
| 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_AURA_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 protected: | 171 protected: |
| 172 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 172 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
| 173 | 173 |
| 174 private: | 174 private: |
| 175 class ActiveWindowObserver; | 175 class ActiveWindowObserver; |
| 176 | 176 |
| 177 void SetInitialFocus(); | 177 void SetInitialFocus(); |
| 178 | 178 |
| 179 #if defined(ENABLE_DIP) | 179 #if defined(ENABLE_DIP) |
| 180 // Returns the monitor in which this widget is placed. | 180 // Returns the scale factor of the monitor in which this widget is placed. |
| 181 aura::Monitor* GetMonitor() const; | 181 float GetMonitorScaleFactor() const; |
| 182 | 182 |
| 183 // Utility functions that convert point/size/rect between | 183 // Utility functions that convert point/size/rect between |
| 184 // the monitor's coordinate system and the widget's coordinate system. | 184 // the monitor's coordinate system and the widget's coordinate system. |
| 185 // TODO(oshima): Remove these once aura supports DIP coordinate system. |
| 185 gfx::Point ConvertPointFromMonitor(const gfx::Point& point) const; | 186 gfx::Point ConvertPointFromMonitor(const gfx::Point& point) const; |
| 186 gfx::Size ConvertSizeFromMonitor(const gfx::Size& size) const; | 187 gfx::Size ConvertSizeFromMonitor(const gfx::Size& size) const; |
| 187 gfx::Rect ConvertRectFromMonitor(const gfx::Rect& rect) const; | 188 gfx::Rect ConvertRectFromMonitor(const gfx::Rect& rect) const; |
| 188 gfx::Size ConvertSizeToMonitor(const gfx::Size& size) const; | 189 gfx::Size ConvertSizeToMonitor(const gfx::Size& size) const; |
| 189 gfx::Rect ConvertRectToMonitor(const gfx::Rect& rect) const; | 190 gfx::Rect ConvertRectToMonitor(const gfx::Rect& rect) const; |
| 190 #endif | 191 #endif |
| 191 | 192 |
| 192 internal::NativeWidgetDelegate* delegate_; | 193 internal::NativeWidgetDelegate* delegate_; |
| 193 | 194 |
| 194 scoped_ptr<aura::RootWindow> root_window_; | 195 scoped_ptr<aura::RootWindow> root_window_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 217 int last_drop_operation_; | 218 int last_drop_operation_; |
| 218 | 219 |
| 219 static bool g_aura_desktop_hax; | 220 static bool g_aura_desktop_hax; |
| 220 | 221 |
| 221 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); | 222 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); |
| 222 }; | 223 }; |
| 223 | 224 |
| 224 } // namespace views | 225 } // namespace views |
| 225 | 226 |
| 226 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 227 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| OLD | NEW |