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

Side by Side Diff: components/mus/ws/connection_manager.cc

Issue 1474543002: Makes NewWindow() take set of properties for window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke shadow_style changes Created 5 years 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 | « components/mus/ws/connection_manager.h ('k') | components/mus/ws/server_window.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 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 "components/mus/ws/connection_manager.h" 5 #include "components/mus/ws/connection_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "components/mus/ws/client_connection.h" 9 #include "components/mus/ws/client_connection.h"
10 #include "components/mus/ws/connection_manager_delegate.h" 10 #include "components/mus/ws/connection_manager_delegate.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void ConnectionManager::AddHost(WindowTreeHostConnection* host_connection) { 52 void ConnectionManager::AddHost(WindowTreeHostConnection* host_connection) {
53 DCHECK_EQ(0u, 53 DCHECK_EQ(0u,
54 host_connection_map_.count(host_connection->window_tree_host())); 54 host_connection_map_.count(host_connection->window_tree_host()));
55 const bool is_first_connection = host_connection_map_.empty(); 55 const bool is_first_connection = host_connection_map_.empty();
56 host_connection_map_[host_connection->window_tree_host()] = host_connection; 56 host_connection_map_[host_connection->window_tree_host()] = host_connection;
57 if (is_first_connection) 57 if (is_first_connection)
58 delegate_->OnFirstRootConnectionCreated(); 58 delegate_->OnFirstRootConnectionCreated();
59 } 59 }
60 60
61 ServerWindow* ConnectionManager::CreateServerWindow(const WindowId& id) { 61 ServerWindow* ConnectionManager::CreateServerWindow(
62 ServerWindow* window = new ServerWindow(this, id); 62 const WindowId& id,
63 const std::map<std::string, std::vector<uint8_t>>& properties) {
64 ServerWindow* window = new ServerWindow(this, id, properties);
63 window->AddObserver(this); 65 window->AddObserver(this);
64 return window; 66 return window;
65 } 67 }
66 68
67 ConnectionSpecificId ConnectionManager::GetAndAdvanceNextConnectionId() { 69 ConnectionSpecificId ConnectionManager::GetAndAdvanceNextConnectionId() {
68 const ConnectionSpecificId id = next_connection_id_++; 70 const ConnectionSpecificId id = next_connection_id_++;
69 DCHECK_LT(id, next_connection_id_); 71 DCHECK_LT(id, next_connection_id_);
70 return id; 72 return id;
71 } 73 }
72 74
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 return; 501 return;
500 for (auto& pair : connection_map_) { 502 for (auto& pair : connection_map_) {
501 pair.second->service()->ProcessTransientWindowRemoved( 503 pair.second->service()->ProcessTransientWindowRemoved(
502 window, transient_child, IsOperationSource(pair.first)); 504 window, transient_child, IsOperationSource(pair.first));
503 } 505 }
504 } 506 }
505 507
506 } // namespace ws 508 } // namespace ws
507 509
508 } // namespace mus 510 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/connection_manager.h ('k') | components/mus/ws/server_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698