Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: ui/mojo/init/ui_init.cc

Issue 1407073002: Adds GetDisplays() to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/mojo/init/ui_init.h ('k') | ui/views/mus/aura_init.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/mojo/init/ui_init.h" 5 #include "ui/mojo/init/ui_init.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "ui/mojo/init/screen_mojo.h" 8 #include "ui/mojo/init/screen_mojo.h"
9 9
10 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 21 matching lines...) Expand all
32 set_two_finger_tap_enabled(true); 32 set_two_finger_tap_enabled(true);
33 } 33 }
34 34
35 ~GestureConfigurationMojo() override {} 35 ~GestureConfigurationMojo() override {}
36 36
37 private: 37 private:
38 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationMojo); 38 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationMojo);
39 }; 39 };
40 #endif 40 #endif
41 41
42 UIInit::UIInit(const gfx::Size& screen_size_in_pixels, float device_pixel_ratio) 42 UIInit::UIInit(const std::vector<gfx::Display>& displays)
43 : screen_(new ScreenMojo(screen_size_in_pixels, device_pixel_ratio)) { 43 : screen_(new ScreenMojo(displays)) {
44 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 44 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
45 #if defined(OS_ANDROID) 45 #if defined(OS_ANDROID)
46 gesture_configuration_.reset(new GestureConfigurationMojo); 46 gesture_configuration_.reset(new GestureConfigurationMojo);
47 ui::GestureConfiguration::SetInstance(gesture_configuration_.get()); 47 ui::GestureConfiguration::SetInstance(gesture_configuration_.get());
48 #endif 48 #endif
49 } 49 }
50 50
51 UIInit::~UIInit() { 51 UIInit::~UIInit() {
52 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, nullptr); 52 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, nullptr);
53 #if defined(OS_ANDROID) 53 #if defined(OS_ANDROID)
54 ui::GestureConfiguration::SetInstance(nullptr); 54 ui::GestureConfiguration::SetInstance(nullptr);
55 #endif 55 #endif
56 } 56 }
57 57
58 } // namespace mojo 58 } // namespace mojo
59 } // namespace ui 59 } // namespace ui
OLDNEW
« no previous file with comments | « ui/mojo/init/ui_init.h ('k') | ui/views/mus/aura_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698