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

Side by Side Diff: mash/wm/non_client_frame_controller.cc

Issue 1878303002: mash: Don't draw the window title under chrome tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « mash/wm/non_client_frame_controller.h ('k') | no next file » | 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 "mash/wm/non_client_frame_controller.h" 5 #include "mash/wm/non_client_frame_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 (GetResizeBehavior(window_) & 249 (GetResizeBehavior(window_) &
250 mus::mojom::kResizeBehaviorCanMaximize) != 0; 250 mus::mojom::kResizeBehaviorCanMaximize) != 0;
251 } 251 }
252 252
253 bool NonClientFrameController::CanMinimize() const { 253 bool NonClientFrameController::CanMinimize() const {
254 return window_ && 254 return window_ &&
255 (GetResizeBehavior(window_) & 255 (GetResizeBehavior(window_) &
256 mus::mojom::kResizeBehaviorCanMinimize) != 0; 256 mus::mojom::kResizeBehaviorCanMinimize) != 0;
257 } 257 }
258 258
259 bool NonClientFrameController::ShouldShowWindowTitle() const {
260 // Only draw the title if the client hasn't declared any additional client
261 // areas which might conflict with it.
262 return window_ && window_->additional_client_areas().empty();
263 }
264
259 views::ClientView* NonClientFrameController::CreateClientView( 265 views::ClientView* NonClientFrameController::CreateClientView(
260 views::Widget* widget) { 266 views::Widget* widget) {
261 return new ClientViewMus(widget, GetContentsView(), this); 267 return new ClientViewMus(widget, GetContentsView(), this);
262 } 268 }
263 269
264 void NonClientFrameController::OnWindowSharedPropertyChanged( 270 void NonClientFrameController::OnWindowSharedPropertyChanged(
265 mus::Window* window, 271 mus::Window* window,
266 const std::string& name, 272 const std::string& name,
267 const std::vector<uint8_t>* old_data, 273 const std::vector<uint8_t>* old_data,
268 const std::vector<uint8_t>* new_data) { 274 const std::vector<uint8_t>* new_data) {
269 if (name == mus::mojom::WindowManager::kResizeBehavior_Property) 275 if (name == mus::mojom::WindowManager::kResizeBehavior_Property)
270 widget_->OnSizeConstraintsChanged(); 276 widget_->OnSizeConstraintsChanged();
271 else if (name == mus::mojom::WindowManager::kWindowTitle_Property) 277 else if (name == mus::mojom::WindowManager::kWindowTitle_Property)
272 widget_->UpdateWindowTitle(); 278 widget_->UpdateWindowTitle();
273 } 279 }
274 280
275 void NonClientFrameController::OnWindowDestroyed(mus::Window* window) { 281 void NonClientFrameController::OnWindowDestroyed(mus::Window* window) {
276 window_->RemoveObserver(this); 282 window_->RemoveObserver(this);
277 window_ = nullptr; 283 window_ = nullptr;
278 } 284 }
279 285
280 } // namespace wm 286 } // namespace wm
281 } // namespace mash 287 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/non_client_frame_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698