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

Side by Side Diff: mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc

Issue 507173003: Change TypeConverter<X,Y>::ConvertFrom and ConvertTo into a single symmetric (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile for real Created 6 years, 3 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
OLDNEW
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 "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h" 5 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // ViewManagerClientImpl, ViewManagerClient implementation: 294 // ViewManagerClientImpl, ViewManagerClient implementation:
295 295
296 void ViewManagerClientImpl::OnEmbed( 296 void ViewManagerClientImpl::OnEmbed(
297 ConnectionSpecificId connection_id, 297 ConnectionSpecificId connection_id,
298 const String& creator_url, 298 const String& creator_url,
299 ViewDataPtr root_data, 299 ViewDataPtr root_data,
300 InterfaceRequest<ServiceProvider> service_provider) { 300 InterfaceRequest<ServiceProvider> service_provider) {
301 if (!connected_) { 301 if (!connected_) {
302 connected_ = true; 302 connected_ = true;
303 connection_id_ = connection_id; 303 connection_id_ = connection_id;
304 creator_url_ = TypeConverter<String, std::string>::ConvertFrom(creator_url); 304 creator_url_ = String::From(creator_url);
305 } else { 305 } else {
306 DCHECK_EQ(connection_id_, connection_id); 306 DCHECK_EQ(connection_id_, connection_id);
307 DCHECK_EQ(creator_url_, creator_url); 307 DCHECK_EQ(creator_url_, creator_url);
308 } 308 }
309 309
310 // A new root must not already exist as a root or be contained by an existing 310 // A new root must not already exist as a root or be contained by an existing
311 // hierarchy visible to this view manager. 311 // hierarchy visible to this view manager.
312 View* root = AddViewToViewManager(this, NULL, root_data->view_id, 312 View* root = AddViewToViewManager(this, NULL, root_data->view_id,
313 root_data->bounds.To<gfx::Rect>()); 313 root_data->bounds.To<gfx::Rect>());
314 roots_.push_back(root); 314 roots_.push_back(root);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 base::Unretained(this)); 439 base::Unretained(this));
440 } 440 }
441 441
442 base::Callback<void(ErrorCode)> 442 base::Callback<void(ErrorCode)>
443 ViewManagerClientImpl::ActionCompletedCallbackWithErrorCode() { 443 ViewManagerClientImpl::ActionCompletedCallbackWithErrorCode() {
444 return base::Bind(&ViewManagerClientImpl::OnActionCompletedWithErrorCode, 444 return base::Bind(&ViewManagerClientImpl::OnActionCompletedWithErrorCode,
445 base::Unretained(this)); 445 base::Unretained(this));
446 } 446 }
447 447
448 } // namespace mojo 448 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/surfaces/tests/surface_unittest.cc ('k') | mojo/services/surfaces/surfaces_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698