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

Side by Side Diff: ui/views/mus/native_widget_mus.cc

Issue 2040783002: Drop unnecessary override of OnWindowBoundsChanged in NativeWidgetMus::MusWindowObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set delegate in StubWindow to enable normal flow for notifying OnBoundsChanged Created 4 years, 6 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 "ui/views/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 mus::mojom::ShowState show_state() { return show_state_; } 357 mus::mojom::ShowState show_state() { return show_state_; }
358 358
359 // mus::WindowObserver: 359 // mus::WindowObserver:
360 void OnWindowVisibilityChanging(mus::Window* window) override { 360 void OnWindowVisibilityChanging(mus::Window* window) override {
361 native_widget_mus_->OnMusWindowVisibilityChanging(window); 361 native_widget_mus_->OnMusWindowVisibilityChanging(window);
362 } 362 }
363 void OnWindowVisibilityChanged(mus::Window* window) override { 363 void OnWindowVisibilityChanged(mus::Window* window) override {
364 native_widget_mus_->OnMusWindowVisibilityChanged(window); 364 native_widget_mus_->OnMusWindowVisibilityChanged(window);
365 } 365 }
366 void OnWindowBoundsChanged(mus::Window* window,
367 const gfx::Rect& old_bounds,
368 const gfx::Rect& new_bounds) override {
369 platform_window_delegate()->OnBoundsChanged(new_bounds);
370 }
371 void OnWindowPredefinedCursorChanged(mus::Window* window, 366 void OnWindowPredefinedCursorChanged(mus::Window* window,
372 mus::mojom::Cursor cursor) override { 367 mus::mojom::Cursor cursor) override {
373 DCHECK_EQ(window, mus_window()); 368 DCHECK_EQ(window, mus_window());
374 native_widget_mus_->set_last_cursor(cursor); 369 native_widget_mus_->set_last_cursor(cursor);
375 } 370 }
376 void OnWindowSharedPropertyChanged( 371 void OnWindowSharedPropertyChanged(
377 mus::Window* window, 372 mus::Window* window,
378 const std::string& name, 373 const std::string& name,
379 const std::vector<uint8_t>* old_data, 374 const std::vector<uint8_t>* old_data,
380 const std::vector<uint8_t>* new_data) override { 375 const std::vector<uint8_t>* new_data) override {
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 1354
1360 gfx::Path mask_path; 1355 gfx::Path mask_path;
1361 native_widget_delegate_->GetHitTestMask(&mask_path); 1356 native_widget_delegate_->GetHitTestMask(&mask_path);
1362 // TODO(jamescook): Use the full path for the mask. 1357 // TODO(jamescook): Use the full path for the mask.
1363 gfx::Rect mask_rect = 1358 gfx::Rect mask_rect =
1364 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); 1359 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds()));
1365 window_->SetHitTestMask(mask_rect); 1360 window_->SetHitTestMask(mask_rect);
1366 } 1361 }
1367 1362
1368 } // namespace views 1363 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698