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

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

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 2 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 | « services/ui/ws/server_window.h ('k') | services/ui/ws/server_window_delegate.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 "services/ui/ws/server_window.h" 5 #include "services/ui/ws/server_window.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 OnWindowSharedPropertyChanged(this, name, value)); 331 OnWindowSharedPropertyChanged(this, name, value));
332 } 332 }
333 333
334 std::string ServerWindow::GetName() const { 334 std::string ServerWindow::GetName() const {
335 auto it = properties_.find(mojom::WindowManager::kName_Property); 335 auto it = properties_.find(mojom::WindowManager::kName_Property);
336 if (it == properties_.end()) 336 if (it == properties_.end())
337 return std::string(); 337 return std::string();
338 return std::string(it->second.begin(), it->second.end()); 338 return std::string(it->second.begin(), it->second.end());
339 } 339 }
340 340
341 bool ServerWindow::IsContainer() const {
342 auto it = properties_.find(mojom::WindowManager::kContainer_Property);
343 if (it == properties_.end())
344 return false;
345 return true;
346 }
347
341 void ServerWindow::SetTextInputState(const ui::TextInputState& state) { 348 void ServerWindow::SetTextInputState(const ui::TextInputState& state) {
342 const bool changed = !(text_input_state_ == state); 349 const bool changed = !(text_input_state_ == state);
343 if (changed) { 350 if (changed) {
344 text_input_state_ = state; 351 text_input_state_ = state;
345 // keyboard even if the state is not changed. So we have to notify 352 // keyboard even if the state is not changed. So we have to notify
346 // |observers_|. 353 // |observers_|.
347 FOR_EACH_OBSERVER(ServerWindowObserver, observers_, 354 FOR_EACH_OBSERVER(ServerWindowObserver, observers_,
348 OnWindowTextInputStateChanged(this, state)); 355 OnWindowTextInputStateChanged(this, state));
349 } 356 }
350 } 357 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 } 469 }
463 470
464 // static 471 // static
465 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { 472 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) {
466 return &window->stacking_target_; 473 return &window->stacking_target_;
467 } 474 }
468 475
469 } // namespace ws 476 } // namespace ws
470 477
471 } // namespace ui 478 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/server_window.h ('k') | services/ui/ws/server_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698