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

Side by Side Diff: mash/screenlock/screenlock.cc

Issue 1832133002: mus: Remove unnecessary const from property TypeConverter templates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 4 years, 9 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 | « mash/login/login.cc ('k') | mash/wm/property_util.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mash/screenlock/screenlock.h" 5 #include "mash/screenlock/screenlock.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "components/mus/public/cpp/property_type_converters.h" 9 #include "components/mus/public/cpp/property_type_converters.h"
10 #include "mash/session/public/interfaces/session.mojom.h" 10 #include "mash/session/public/interfaces/session.mojom.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 88 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
89 views::WindowManagerConnection::Create(connector); 89 views::WindowManagerConnection::Create(connector);
90 90
91 views::Widget* widget = new views::Widget; 91 views::Widget* widget = new views::Widget;
92 views::Widget::InitParams params( 92 views::Widget::InitParams params(
93 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 93 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
94 params.delegate = new ScreenlockView(connector); 94 params.delegate = new ScreenlockView(connector);
95 95
96 std::map<std::string, std::vector<uint8_t>> properties; 96 std::map<std::string, std::vector<uint8_t>> properties;
97 properties[mash::wm::mojom::kWindowContainer_Property] = 97 properties[mash::wm::mojom::kWindowContainer_Property] =
98 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert( 98 mojo::ConvertTo<std::vector<uint8_t>>(
99 static_cast<int32_t>(mash::wm::mojom::Container::LOGIN_WINDOWS)); 99 static_cast<int32_t>(mash::wm::mojom::Container::LOGIN_WINDOWS));
100 mus::Window* window = 100 mus::Window* window =
101 views::WindowManagerConnection::Get()->NewWindow(properties); 101 views::WindowManagerConnection::Get()->NewWindow(properties);
102 params.native_widget = new views::NativeWidgetMus( 102 params.native_widget = new views::NativeWidgetMus(
103 widget, connector, window, mus::mojom::SurfaceType::DEFAULT); 103 widget, connector, window, mus::mojom::SurfaceType::DEFAULT);
104 widget->Init(params); 104 widget->Init(params);
105 widget->Show(); 105 widget->Show();
106 } 106 }
107 107
108 void Screenlock::ScreenlockStateChanged(bool screen_locked) { 108 void Screenlock::ScreenlockStateChanged(bool screen_locked) {
109 if (!screen_locked) 109 if (!screen_locked)
110 base::MessageLoop::current()->QuitWhenIdle(); 110 base::MessageLoop::current()->QuitWhenIdle();
111 } 111 }
112 112
113 } // namespace screenlock 113 } // namespace screenlock
114 } // namespace main 114 } // namespace main
OLDNEW
« no previous file with comments | « mash/login/login.cc ('k') | mash/wm/property_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698