OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/browser/renderer_host/render_widget_host_impl.h" | 8 #include "content/browser/renderer_host/render_widget_host_impl.h" |
9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
10 #include "content/public/browser/render_widget_host.h" | 10 #include "content/public/browser/render_widget_host.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } else if (strType == "landscape-secondary") { | 58 } else if (strType == "landscape-secondary") { |
59 type = blink::WebScreenOrientationLandscapeSecondary; | 59 type = blink::WebScreenOrientationLandscapeSecondary; |
60 } | 60 } |
61 ASSERT_NE(blink::WebScreenOrientationUndefined, type); | 61 ASSERT_NE(blink::WebScreenOrientationUndefined, type); |
62 screen_info.orientationType = type; | 62 screen_info.orientationType = type; |
63 | 63 |
64 ViewMsg_Resize_Params params; | 64 ViewMsg_Resize_Params params; |
65 params.screen_info = screen_info; | 65 params.screen_info = screen_info; |
66 params.new_size = gfx::Size(0, 0); | 66 params.new_size = gfx::Size(0, 0); |
67 params.physical_backing_size = gfx::Size(300, 300); | 67 params.physical_backing_size = gfx::Size(300, 300); |
68 params.top_controls_layout_height = 0.f; | 68 params.top_controls_height = 0.f; |
| 69 params.top_controls_shrink_blink_size = false; |
69 params.resizer_rect = gfx::Rect(); | 70 params.resizer_rect = gfx::Rect(); |
70 params.is_fullscreen = false; | 71 params.is_fullscreen = false; |
71 rwh->Send(new ViewMsg_Resize(rwh->GetRoutingID(), params)); | 72 rwh->Send(new ViewMsg_Resize(rwh->GetRoutingID(), params)); |
72 } | 73 } |
73 | 74 |
74 int GetOrientationAngle() { | 75 int GetOrientationAngle() { |
75 int angle; | 76 int angle; |
76 ExecuteScriptAndGetValue(shell()->web_contents()->GetMainFrame(), | 77 ExecuteScriptAndGetValue(shell()->web_contents()->GetMainFrame(), |
77 "screen.orientation.angle")->GetAsInteger(&angle); | 78 "screen.orientation.angle")->GetAsInteger(&angle); |
78 return angle; | 79 return angle; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 } | 231 } |
231 #endif // defined(OS_WIN) | 232 #endif // defined(OS_WIN) |
232 | 233 |
233 navigation_observer.Wait(); | 234 navigation_observer.Wait(); |
234 | 235 |
235 // This is a success if the renderer process did not crash, thus, we end up | 236 // This is a success if the renderer process did not crash, thus, we end up |
236 // here. | 237 // here. |
237 } | 238 } |
238 | 239 |
239 } // namespace content | 240 } // namespace content |
OLD | NEW |