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

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

Issue 2390953004: WidgetDelegateView is its own contents view. (Closed)
Patch Set: another minor fix 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
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>
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 385
386 base::string16 title = window_->GetSharedProperty<base::string16>( 386 base::string16 title = window_->GetSharedProperty<base::string16>(
387 ui::mojom::WindowManager::kWindowTitle_Property); 387 ui::mojom::WindowManager::kWindowTitle_Property);
388 388
389 if (IsWindowJanky(window_)) 389 if (IsWindowJanky(window_))
390 title += base::ASCIIToUTF16(" !! Not responding !!"); 390 title += base::ASCIIToUTF16(" !! Not responding !!");
391 391
392 return title; 392 return title;
393 } 393 }
394 394
395 views::View* NonClientFrameController::GetContentsView() {
396 return this;
397 }
398
399 bool NonClientFrameController::CanResize() const { 395 bool NonClientFrameController::CanResize() const {
400 return window_ && 396 return window_ &&
401 (GetResizeBehavior(window_) & ui::mojom::kResizeBehaviorCanResize) != 397 (GetResizeBehavior(window_) & ui::mojom::kResizeBehaviorCanResize) !=
402 0; 398 0;
403 } 399 }
404 400
405 bool NonClientFrameController::CanMaximize() const { 401 bool NonClientFrameController::CanMaximize() const {
406 return window_ && 402 return window_ &&
407 (GetResizeBehavior(window_) & ui::mojom::kResizeBehaviorCanMaximize) != 403 (GetResizeBehavior(window_) & ui::mojom::kResizeBehaviorCanMaximize) !=
408 0; 404 0;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 454 }
459 } 455 }
460 456
461 void NonClientFrameController::OnWindowDestroyed(ui::Window* window) { 457 void NonClientFrameController::OnWindowDestroyed(ui::Window* window) {
462 window_->RemoveObserver(this); 458 window_->RemoveObserver(this);
463 window_ = nullptr; 459 window_ = nullptr;
464 } 460 }
465 461
466 } // namespace mus 462 } // namespace mus
467 } // namespace ash 463 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698