| 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 "athena/env/public/athena_env.h" | 5 #include "athena/env/public/athena_env.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "athena/util/fill_layout_manager.h" | 9 #include "athena/util/fill_layout_manager.h" |
| 10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 screen_for_shutdown = new ScreenForShutdown(screen->GetPrimaryDisplay()); | 49 screen_for_shutdown = new ScreenForShutdown(screen->GetPrimaryDisplay()); |
| 50 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, | 50 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |
| 51 screen_for_shutdown); | 51 screen_for_shutdown); |
| 52 } | 52 } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 explicit ScreenForShutdown(const gfx::Display& primary_display) | 55 explicit ScreenForShutdown(const gfx::Display& primary_display) |
| 56 : primary_display_(primary_display) {} | 56 : primary_display_(primary_display) {} |
| 57 | 57 |
| 58 // gfx::Screen overrides: | 58 // gfx::Screen overrides: |
| 59 virtual bool IsDIPEnabled() override { return true; } | |
| 60 virtual gfx::Point GetCursorScreenPoint() override { return gfx::Point(); } | 59 virtual gfx::Point GetCursorScreenPoint() override { return gfx::Point(); } |
| 61 virtual gfx::NativeWindow GetWindowUnderCursor() override { return NULL; } | 60 virtual gfx::NativeWindow GetWindowUnderCursor() override { return NULL; } |
| 62 virtual gfx::NativeWindow GetWindowAtScreenPoint( | 61 virtual gfx::NativeWindow GetWindowAtScreenPoint( |
| 63 const gfx::Point& point) override { | 62 const gfx::Point& point) override { |
| 64 return NULL; | 63 return NULL; |
| 65 } | 64 } |
| 66 virtual int GetNumDisplays() const override { return 1; } | 65 virtual int GetNumDisplays() const override { return 1; } |
| 67 virtual std::vector<gfx::Display> GetAllDisplays() const override { | 66 virtual std::vector<gfx::Display> GetAllDisplays() const override { |
| 68 std::vector<gfx::Display> displays(1, primary_display_); | 67 std::vector<gfx::Display> displays(1, primary_display_); |
| 69 return displays; | 68 return displays; |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 345 |
| 347 // static | 346 // static |
| 348 | 347 |
| 349 // static | 348 // static |
| 350 void AthenaEnv::Shutdown() { | 349 void AthenaEnv::Shutdown() { |
| 351 DCHECK(instance); | 350 DCHECK(instance); |
| 352 delete instance; | 351 delete instance; |
| 353 } | 352 } |
| 354 | 353 |
| 355 } // namespace athena | 354 } // namespace athena |
| OLD | NEW |