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

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

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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/message_center/views/toast_contents_view.cc ('k') | ui/snapshot/snapshot_android.cc » ('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/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ui/mojo/init/screen_mojo.h" 10 #include "ui/mojo/init/screen_mojo.h"
(...skipping 25 matching lines...) Expand all
36 36
37 ~GestureConfigurationMojo() override {} 37 ~GestureConfigurationMojo() override {}
38 38
39 private: 39 private:
40 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationMojo); 40 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationMojo);
41 }; 41 };
42 #endif 42 #endif
43 43
44 UIInit::UIInit(const std::vector<gfx::Display>& displays) 44 UIInit::UIInit(const std::vector<gfx::Display>& displays)
45 : screen_(new ScreenMojo(displays)) { 45 : screen_(new ScreenMojo(displays)) {
46 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 46 gfx::Screen::SetScreenInstance(screen_.get());
47 #if defined(OS_ANDROID) 47 #if defined(OS_ANDROID)
48 gesture_configuration_.reset(new GestureConfigurationMojo); 48 gesture_configuration_.reset(new GestureConfigurationMojo);
49 ui::GestureConfiguration::SetInstance(gesture_configuration_.get()); 49 ui::GestureConfiguration::SetInstance(gesture_configuration_.get());
50 #endif 50 #endif
51 } 51 }
52 52
53 UIInit::~UIInit() { 53 UIInit::~UIInit() {
54 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, nullptr); 54 gfx::Screen::SetScreenInstance(nullptr);
55 #if defined(OS_ANDROID) 55 #if defined(OS_ANDROID)
56 ui::GestureConfiguration::SetInstance(nullptr); 56 ui::GestureConfiguration::SetInstance(nullptr);
57 #endif 57 #endif
58 } 58 }
59 59
60 } // namespace mojo 60 } // namespace mojo
61 } // namespace ui 61 } // namespace ui
OLDNEW
« no previous file with comments | « ui/message_center/views/toast_contents_view.cc ('k') | ui/snapshot/snapshot_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698