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

Side by Side Diff: ui/aura/mus/window_tree_client.cc

Issue 2507963002: Implement hit tests/client area. (Closed)
Patch Set: Merge with tot Created 4 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
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 "ui/aura/mus/window_tree_client.h" 5 #include "ui/aura/mus/window_tree_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 } 1496 }
1497 } 1497 }
1498 1498
1499 void WindowTreeClient::OnWindowTreeHostBoundsWillChange( 1499 void WindowTreeClient::OnWindowTreeHostBoundsWillChange(
1500 WindowTreeHostMus* window_tree_host, 1500 WindowTreeHostMus* window_tree_host,
1501 const gfx::Rect& bounds) { 1501 const gfx::Rect& bounds) {
1502 ScheduleInFlightBoundsChange(WindowMus::Get(window_tree_host->window()), 1502 ScheduleInFlightBoundsChange(WindowMus::Get(window_tree_host->window()),
1503 window_tree_host->GetBounds(), bounds); 1503 window_tree_host->GetBounds(), bounds);
1504 } 1504 }
1505 1505
1506 void WindowTreeClient::OnWindowTreeHostClientAreaWillChange(
1507 WindowTreeHostMus* window_tree_host,
1508 const gfx::Insets& insets) {
1509 SetClientArea(window_tree_host->window(), insets, std::vector<gfx::Rect>());
sky 2016/11/19 15:29:31 optional: I don't think anyone else is calling Set
Elliot Glaysher 2016/11/22 00:48:07 Done.
1510 }
1511
1512 void WindowTreeClient::OnWindowTreeHostClearHitTestMask(
1513 WindowTreeHostMus* window_tree_host) {
1514 ClearHitTestMask(window_tree_host->window());
1515 }
1516
1517 void WindowTreeClient::OnWindowTreeHostHitTestMaskWillChange(
1518 WindowTreeHostMus* window_tree_host,
1519 const gfx::Rect& mask_rect) {
1520 SetHitTestMask(window_tree_host->window(), mask_rect);
1521 }
1522
1506 std::unique_ptr<WindowPortMus> WindowTreeClient::CreateWindowPortForTopLevel() { 1523 std::unique_ptr<WindowPortMus> WindowTreeClient::CreateWindowPortForTopLevel() {
1507 std::unique_ptr<WindowPortMus> window_port = 1524 std::unique_ptr<WindowPortMus> window_port =
1508 base::MakeUnique<WindowPortMus>(this, WindowMusType::TOP_LEVEL); 1525 base::MakeUnique<WindowPortMus>(this, WindowMusType::TOP_LEVEL);
1509 roots_.insert(window_port.get()); 1526 roots_.insert(window_port.get());
1510 return window_port; 1527 return window_port;
1511 } 1528 }
1512 1529
1513 void WindowTreeClient::OnWindowTreeHostCreated( 1530 void WindowTreeClient::OnWindowTreeHostCreated(
1514 WindowTreeHostMus* window_tree_host) { 1531 WindowTreeHostMus* window_tree_host) {
1515 // All WindowTreeHosts are destroyed before this, so we don't need to unset 1532 // All WindowTreeHosts are destroyed before this, so we don't need to unset
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( 1575 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>(
1559 this, capture_synchronizer_.get(), window)); 1576 this, capture_synchronizer_.get(), window));
1560 } 1577 }
1561 1578
1562 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { 1579 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) {
1563 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( 1580 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>(
1564 this, focus_synchronizer_.get(), window)); 1581 this, focus_synchronizer_.get(), window));
1565 } 1582 }
1566 1583
1567 } // namespace aura 1584 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698