| 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 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 309 |
| 310 // The Display rotation and the WebScreenInfo orientation are not the same | 310 // The Display rotation and the WebScreenInfo orientation are not the same |
| 311 // angle. The former is the physical display rotation while the later is the | 311 // angle. The former is the physical display rotation while the later is the |
| 312 // rotation required by the content to be shown properly on the screen, in | 312 // rotation required by the content to be shown properly on the screen, in |
| 313 // other words, relative to the physical display. | 313 // other words, relative to the physical display. |
| 314 results->orientationAngle = display.RotationAsDegree(); | 314 results->orientationAngle = display.RotationAsDegree(); |
| 315 if (results->orientationAngle == 90) | 315 if (results->orientationAngle == 90) |
| 316 results->orientationAngle = 270; | 316 results->orientationAngle = 270; |
| 317 else if (results->orientationAngle == 270) | 317 else if (results->orientationAngle == 270) |
| 318 results->orientationAngle = 90; | 318 results->orientationAngle = 90; |
| 319 |
| 320 results->orientationType = |
| 321 RenderWidgetHostViewBase::GetOrientationTypeFromDisplay(display); |
| 319 } | 322 } |
| 320 | 323 |
| 321 bool PointerEventActivates(const ui::Event& event) { | 324 bool PointerEventActivates(const ui::Event& event) { |
| 322 if (event.type() == ui::ET_MOUSE_PRESSED) | 325 if (event.type() == ui::ET_MOUSE_PRESSED) |
| 323 return true; | 326 return true; |
| 324 | 327 |
| 325 if (event.type() == ui::ET_GESTURE_BEGIN) { | 328 if (event.type() == ui::ET_GESTURE_BEGIN) { |
| 326 const ui::GestureEvent& gesture = | 329 const ui::GestureEvent& gesture = |
| 327 static_cast<const ui::GestureEvent&>(event); | 330 static_cast<const ui::GestureEvent&>(event); |
| 328 return gesture.details().touch_points() == 1; | 331 return gesture.details().touch_points() == 1; |
| (...skipping 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2466 | 2469 |
| 2467 //////////////////////////////////////////////////////////////////////////////// | 2470 //////////////////////////////////////////////////////////////////////////////// |
| 2468 // RenderWidgetHostViewBase, public: | 2471 // RenderWidgetHostViewBase, public: |
| 2469 | 2472 |
| 2470 // static | 2473 // static |
| 2471 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2474 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2472 GetScreenInfoForWindow(results, NULL); | 2475 GetScreenInfoForWindow(results, NULL); |
| 2473 } | 2476 } |
| 2474 | 2477 |
| 2475 } // namespace content | 2478 } // namespace content |
| OLD | NEW |