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

Side by Side Diff: ash/mus/non_client_frame_controller.cc

Issue 2901663003: chromeos: converts WindowState to aura::Window (Closed)
Patch Set: feedback Created 3 years, 7 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 | « ash/frame/custom_frame_view_ash.cc ('k') | ash/root_window_controller.cc » ('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 "ash/mus/non_client_frame_controller.h" 5 #include "ash/mus/non_client_frame_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/ash_constants.h" 13 #include "ash/ash_constants.h"
14 #include "ash/ash_layout_constants.h" 14 #include "ash/ash_layout_constants.h"
15 #include "ash/frame/custom_frame_view_ash.h" 15 #include "ash/frame/custom_frame_view_ash.h"
16 #include "ash/mus/frame/detached_title_area_renderer.h" 16 #include "ash/mus/frame/detached_title_area_renderer.h"
17 #include "ash/mus/move_event_handler.h" 17 #include "ash/mus/move_event_handler.h"
18 #include "ash/mus/property_util.h" 18 #include "ash/mus/property_util.h"
19 #include "ash/mus/window_manager.h" 19 #include "ash/mus/window_manager.h"
20 #include "ash/mus/window_properties.h" 20 #include "ash/mus/window_properties.h"
21 #include "ash/shared/immersive_fullscreen_controller_delegate.h" 21 #include "ash/shared/immersive_fullscreen_controller_delegate.h"
22 #include "ash/wm/panels/panel_frame_view.h" 22 #include "ash/wm/panels/panel_frame_view.h"
23 #include "ash/wm/window_properties.h" 23 #include "ash/wm/window_properties.h"
24 #include "ash/wm/window_util.h"
24 #include "ash/wm_window.h" 25 #include "ash/wm_window.h"
25 #include "base/macros.h" 26 #include "base/macros.h"
26 #include "base/memory/ptr_util.h" 27 #include "base/memory/ptr_util.h"
27 #include "base/strings/utf_string_conversions.h" 28 #include "base/strings/utf_string_conversions.h"
28 #include "services/ui/public/interfaces/window_manager.mojom.h" 29 #include "services/ui/public/interfaces/window_manager.mojom.h"
29 #include "ui/aura/client/aura_constants.h" 30 #include "ui/aura/client/aura_constants.h"
30 #include "ui/aura/client/transient_window_client.h" 31 #include "ui/aura/client/transient_window_client.h"
31 #include "ui/aura/mus/property_converter.h" 32 #include "ui/aura/mus/property_converter.h"
32 #include "ui/aura/mus/property_utils.h" 33 #include "ui/aura/mus/property_utils.h"
33 #include "ui/aura/mus/window_manager_delegate.h" 34 #include "ui/aura/mus/window_manager_delegate.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 381
381 base::string16 title = *window_->GetProperty(aura::client::kTitleKey); 382 base::string16 title = *window_->GetProperty(aura::client::kTitleKey);
382 383
383 if (window_->GetProperty(kWindowIsJanky)) 384 if (window_->GetProperty(kWindowIsJanky))
384 title += base::ASCIIToUTF16(" !! Not responding !!"); 385 title += base::ASCIIToUTF16(" !! Not responding !!");
385 386
386 return title; 387 return title;
387 } 388 }
388 389
389 bool NonClientFrameController::CanResize() const { 390 bool NonClientFrameController::CanResize() const {
390 return window_ && WmWindow::Get(window_)->CanResize(); 391 return window_ && (window_->GetProperty(aura::client::kResizeBehaviorKey) &
392 ui::mojom::kResizeBehaviorCanResize) != 0;
391 } 393 }
392 394
393 bool NonClientFrameController::CanMaximize() const { 395 bool NonClientFrameController::CanMaximize() const {
394 return window_ && WmWindow::Get(window_)->CanMaximize(); 396 return window_ && (window_->GetProperty(aura::client::kResizeBehaviorKey) &
397 ui::mojom::kResizeBehaviorCanMaximize) != 0;
395 } 398 }
396 399
397 bool NonClientFrameController::CanMinimize() const { 400 bool NonClientFrameController::CanMinimize() const {
398 return window_ && WmWindow::Get(window_)->CanMinimize(); 401 return window_ && (window_->GetProperty(aura::client::kResizeBehaviorKey) &
402 ui::mojom::kResizeBehaviorCanMinimize) != 0;
399 } 403 }
400 404
401 bool NonClientFrameController::ShouldShowWindowTitle() const { 405 bool NonClientFrameController::ShouldShowWindowTitle() const {
402 // Only draw the title if the client hasn't declared any additional client 406 // Only draw the title if the client hasn't declared any additional client
403 // areas which might conflict with it. 407 // areas which might conflict with it.
404 return window_ && additional_client_areas_.empty(); 408 return window_ && additional_client_areas_.empty();
405 } 409 }
406 410
407 views::ClientView* NonClientFrameController::CreateClientView( 411 views::ClientView* NonClientFrameController::CreateClientView(
408 views::Widget* widget) { 412 views::Widget* widget) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 void NonClientFrameController::OnWillRestackTransientChildAbove( 468 void NonClientFrameController::OnWillRestackTransientChildAbove(
465 aura::Window* parent, 469 aura::Window* parent,
466 aura::Window* transient_child) {} 470 aura::Window* transient_child) {}
467 471
468 void NonClientFrameController::OnDidRestackTransientChildAbove( 472 void NonClientFrameController::OnDidRestackTransientChildAbove(
469 aura::Window* parent, 473 aura::Window* parent,
470 aura::Window* transient_child) {} 474 aura::Window* transient_child) {}
471 475
472 } // namespace mus 476 } // namespace mus
473 } // namespace ash 477 } // namespace ash
OLDNEW
« no previous file with comments | « ash/frame/custom_frame_view_ash.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698