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

Side by Side Diff: services/ui/ws/display.cc

Issue 2511883006: Mojo C++ bindings: switch services/ui/public/interfaces mojom target to use STL types. (Closed)
Patch Set: . Created 4 years, 1 month 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 | « services/ui/ws/display.h ('k') | services/ui/ws/test_change_tracker.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 "services/ui/ws/display.h" 5 #include "services/ui/ws/display.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (cursor_id != last_cursor_) { 193 if (cursor_id != last_cursor_) {
194 platform_display_->SetCursorById(cursor_id); 194 platform_display_->SetCursorById(cursor_id);
195 last_cursor_ = cursor_id; 195 last_cursor_ = cursor_id;
196 } 196 }
197 } 197 }
198 198
199 void Display::SetSize(const gfx::Size& size) { 199 void Display::SetSize(const gfx::Size& size) {
200 platform_display_->SetViewportSize(size); 200 platform_display_->SetViewportSize(size);
201 } 201 }
202 202
203 void Display::SetTitle(const mojo::String& title) { 203 void Display::SetTitle(const std::string& title) {
204 platform_display_->SetTitle(title.To<base::string16>()); 204 platform_display_->SetTitle(base::UTF8ToUTF16(title));
205 } 205 }
206 206
207 void Display::InitWindowManagerDisplayRoots() { 207 void Display::InitWindowManagerDisplayRoots() {
208 if (binding_) { 208 if (binding_) {
209 std::unique_ptr<WindowManagerDisplayRoot> display_root_ptr( 209 std::unique_ptr<WindowManagerDisplayRoot> display_root_ptr(
210 new WindowManagerDisplayRoot(this)); 210 new WindowManagerDisplayRoot(this));
211 WindowManagerDisplayRoot* display_root = display_root_ptr.get(); 211 WindowManagerDisplayRoot* display_root = display_root_ptr.get();
212 // For this case we never create additional displays roots, so any 212 // For this case we never create additional displays roots, so any
213 // id works. 213 // id works.
214 window_manager_display_root_map_[service_manager::mojom::kRootUserID] = 214 window_manager_display_root_map_[service_manager::mojom::kRootUserID] =
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 381
382 void Display::OnWindowManagerWindowTreeFactoryReady( 382 void Display::OnWindowManagerWindowTreeFactoryReady(
383 WindowManagerWindowTreeFactory* factory) { 383 WindowManagerWindowTreeFactory* factory) {
384 if (!binding_) 384 if (!binding_)
385 CreateWindowManagerDisplayRootFromFactory(factory); 385 CreateWindowManagerDisplayRootFromFactory(factory);
386 } 386 }
387 387
388 } // namespace ws 388 } // namespace ws
389 } // namespace ui 389 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/test_change_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698