| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mandoline/ui/aura/screen_mojo.h" | 5 #include "mandoline/ui/aura/screen_mojo.h" |
| 6 | 6 |
| 7 #include "ui/gfx/geometry/rect_conversions.h" | 7 #include "ui/gfx/geometry/rect_conversions.h" |
| 8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
| 9 | 9 |
| 10 namespace mandoline { | 10 namespace mandoline { |
| 11 | 11 |
| 12 // static | 12 // static |
| 13 ScreenMojo* ScreenMojo::Create() { | 13 ScreenMojo* ScreenMojo::Create() { |
| 14 return new ScreenMojo(gfx::Rect(0, 0, 800, 600)); | 14 // TODO(beng): this is bogus & should be derived from the native viewport's |
| 15 // client area. https://crbug.com/487340 |
| 16 return new ScreenMojo(gfx::Rect(1280, 800)); |
| 15 } | 17 } |
| 16 | 18 |
| 17 ScreenMojo::~ScreenMojo() { | 19 ScreenMojo::~ScreenMojo() { |
| 18 } | 20 } |
| 19 | 21 |
| 20 gfx::Point ScreenMojo::GetCursorScreenPoint() { | 22 gfx::Point ScreenMojo::GetCursorScreenPoint() { |
| 21 NOTIMPLEMENTED(); | 23 NOTIMPLEMENTED(); |
| 22 return gfx::Point(); | 24 return gfx::Point(); |
| 23 } | 25 } |
| 24 | 26 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void ScreenMojo::RemoveObserver(gfx::DisplayObserver* observer) { | 64 void ScreenMojo::RemoveObserver(gfx::DisplayObserver* observer) { |
| 63 } | 65 } |
| 64 | 66 |
| 65 ScreenMojo::ScreenMojo(const gfx::Rect& screen_bounds) { | 67 ScreenMojo::ScreenMojo(const gfx::Rect& screen_bounds) { |
| 66 static int64 synthesized_display_id = 2000; | 68 static int64 synthesized_display_id = 2000; |
| 67 display_.set_id(synthesized_display_id++); | 69 display_.set_id(synthesized_display_id++); |
| 68 display_.SetScaleAndBounds(1.0f, screen_bounds); | 70 display_.SetScaleAndBounds(1.0f, screen_bounds); |
| 69 } | 71 } |
| 70 | 72 |
| 71 } // namespace mandoline | 73 } // namespace mandoline |
| OLD | NEW |