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

Side by Side Diff: components/exo/wayland/server.cc

Issue 2185773002: Refactor: remove SetDisplayWorkAreaInsets calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor: remove SetDisplayWorkAreaInsets calls. Created 4 years, 4 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/system/web_notification/ash_popup_alignment_delegate_unittest.cc ('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 "components/exo/wayland/server.h" 5 #include "components/exo/wayland/server.h"
6 6
7 #include <grp.h> 7 #include <grp.h>
8 #include <linux/input.h> 8 #include <linux/input.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 // Overridden from display::DisplayObserver: 1590 // Overridden from display::DisplayObserver:
1591 void OnDisplayAdded(const display::Display& new_display) override {} 1591 void OnDisplayAdded(const display::Display& new_display) override {}
1592 void OnDisplayRemoved(const display::Display& new_display) override {} 1592 void OnDisplayRemoved(const display::Display& new_display) override {}
1593 void OnDisplayMetricsChanged(const display::Display& display, 1593 void OnDisplayMetricsChanged(const display::Display& display,
1594 uint32_t metrics) override { 1594 uint32_t metrics) override {
1595 if (display.id() == display_id_) 1595 if (display.id() == display_id_)
1596 SendConfigure(); 1596 SendConfigure();
1597 } 1597 }
1598 1598
1599 // Overridden from ash::ShellObserver: 1599 // Overridden from ash::ShellObserver:
1600 void OnDisplayWorkAreaInsetsChanged() override { SendConfigure(); }
1601 void OnMaximizeModeStarted() override { 1600 void OnMaximizeModeStarted() override {
1602 SendLayoutModeChange(ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET); 1601 SendLayoutModeChange(ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET);
1603 send_configure_after_layout_change_ = true; 1602 send_configure_after_layout_change_ = true;
1604 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 1603 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
1605 FROM_HERE, base::Bind(&WaylandRemoteShell::MaybeSendConfigure, 1604 FROM_HERE, base::Bind(&WaylandRemoteShell::MaybeSendConfigure,
1606 weak_ptr_factory_.GetWeakPtr()), 1605 weak_ptr_factory_.GetWeakPtr()),
1607 base::TimeDelta::FromMilliseconds(kConfigureDelayAfterLayoutSwitchMs)); 1606 base::TimeDelta::FromMilliseconds(kConfigureDelayAfterLayoutSwitchMs));
1608 } 1607 }
1609 void OnMaximizeModeEnded() override { 1608 void OnMaximizeModeEnded() override {
1610 SendLayoutModeChange(ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED); 1609 SendLayoutModeChange(ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED);
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2996 DCHECK(event_loop); 2995 DCHECK(event_loop);
2997 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); 2996 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds());
2998 } 2997 }
2999 2998
3000 void Server::Flush() { 2999 void Server::Flush() {
3001 wl_display_flush_clients(wl_display_.get()); 3000 wl_display_flush_clients(wl_display_.get());
3002 } 3001 }
3003 3002
3004 } // namespace wayland 3003 } // namespace wayland
3005 } // namespace exo 3004 } // namespace exo
OLDNEW
« no previous file with comments | « ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698