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

Side by Side Diff: components/mus/public/cpp/lib/window.cc

Issue 1456233002: Converts remaining windowmanager property based functions to SetProperty (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | components/mus/public/cpp/lib/window_tree_client_impl.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/public/cpp/window.h" 5 #include "components/mus/public/cpp/window.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 tree_client()->SetWindowTextInputState(id_, state.Pass()); 337 tree_client()->SetWindowTextInputState(id_, state.Pass());
338 } 338 }
339 339
340 void Window::SetImeVisibility(bool visible, mojo::TextInputStatePtr state) { 340 void Window::SetImeVisibility(bool visible, mojo::TextInputStatePtr state) {
341 // SetImeVisibility() shouldn't be used if the window is not editable. 341 // SetImeVisibility() shouldn't be used if the window is not editable.
342 DCHECK(state.is_null() || state->type != mojo::TEXT_INPUT_TYPE_NONE); 342 DCHECK(state.is_null() || state->type != mojo::TEXT_INPUT_TYPE_NONE);
343 if (connection_) 343 if (connection_)
344 tree_client()->SetImeVisibility(id_, visible, state.Pass()); 344 tree_client()->SetImeVisibility(id_, visible, state.Pass());
345 } 345 }
346 346
347 void Window::SetPreferredSize(const gfx::Size& size) {
348 if (connection_)
349 tree_client()->SetPreferredSize(id_, size);
350 }
351
352 void Window::SetResizeBehavior(mojom::ResizeBehavior resize_behavior) {
353 if (connection_)
354 tree_client()->SetResizeBehavior(id_, resize_behavior);
355 }
356
357 void Window::SetFocus() { 347 void Window::SetFocus() {
358 if (connection_) 348 if (connection_)
359 tree_client()->SetFocus(id_); 349 tree_client()->SetFocus(id_);
360 } 350 }
361 351
362 bool Window::HasFocus() const { 352 bool Window::HasFocus() const {
363 return connection_ && connection_->GetFocusedWindow() == this; 353 return connection_ && connection_->GetFocusedWindow() == this;
364 } 354 }
365 355
366 void Window::SetCanFocus(bool can_focus) { 356 void Window::SetCanFocus(bool can_focus) {
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 notifier->NotifyWindowReordered(); 766 notifier->NotifyWindowReordered();
777 767
778 return true; 768 return true;
779 } 769 }
780 770
781 // static 771 // static
782 Window** Window::GetStackingTarget(Window* window) { 772 Window** Window::GetStackingTarget(Window* window) {
783 return &window->stacking_target_; 773 return &window->stacking_target_;
784 } 774 }
785 } // namespace mus 775 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | components/mus/public/cpp/lib/window_tree_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698