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

Unified Diff: components/arc/window_manager/arc_window_manager_bridge.cc

Issue 2190483003: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2785
Patch Set: One less diff line Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/window_manager/arc_window_manager_bridge.h ('k') | ui/arc/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/window_manager/arc_window_manager_bridge.cc
diff --git a/components/arc/window_manager/arc_window_manager_bridge.cc b/components/arc/window_manager/arc_window_manager_bridge.cc
index 5df6796efabe0caf29e5594d378b66cb5b4a8159..323def2e0585278e247eafe24127e5a0ac4524e0 100644
--- a/components/arc/window_manager/arc_window_manager_bridge.cc
+++ b/components/arc/window_manager/arc_window_manager_bridge.cc
@@ -15,7 +15,7 @@ namespace arc {
ArcWindowManagerBridge::ArcWindowManagerBridge(ArcBridgeService* bridge_service)
: ArcService(bridge_service),
current_mode_(mojom::WindowManagerMode::MODE_NORMAL) {
- arc_bridge_service()->AddObserver(this);
+ arc_bridge_service()->window_manager()->AddObserver(this);
if (!ash::WmShell::HasInstance()) {
// The shell gets always loaded before ARC. If there is no shell it can only
// mean that a unit test is running.
@@ -25,7 +25,7 @@ ArcWindowManagerBridge::ArcWindowManagerBridge(ArcBridgeService* bridge_service)
ash::WmShell::Get()->AddShellObserver(this);
}
-void ArcWindowManagerBridge::OnWindowManagerInstanceReady() {
+void ArcWindowManagerBridge::OnInstanceReady() {
if (!ash::Shell::HasInstance()) {
// The shell gets always loaded before ARC. If there is no shell it can only
// mean that a unit test is running.
@@ -43,7 +43,7 @@ void ArcWindowManagerBridge::OnWindowManagerInstanceReady() {
ArcWindowManagerBridge::~ArcWindowManagerBridge() {
if (ash::WmShell::HasInstance())
ash::WmShell::Get()->RemoveShellObserver(this);
- arc_bridge_service()->RemoveObserver(this);
+ arc_bridge_service()->window_manager()->RemoveObserver(this);
}
void ArcWindowManagerBridge::OnMaximizeModeStarted() {
@@ -58,12 +58,12 @@ void ArcWindowManagerBridge::SendWindowManagerModeChange(
bool touch_view_enabled) {
// We let the ArcBridgeService check that we are calling on the right thread.
DCHECK(ArcBridgeService::Get() != nullptr);
- mojom::WindowManagerMode wm_mode = touch_view_enabled ?
- mojom::WindowManagerMode::MODE_TOUCH_VIEW :
- mojom::WindowManagerMode::MODE_NORMAL;
+ mojom::WindowManagerMode wm_mode =
+ touch_view_enabled ? mojom::WindowManagerMode::MODE_TOUCH_VIEW
+ : mojom::WindowManagerMode::MODE_NORMAL;
mojom::WindowManagerInstance* wm_instance =
- arc_bridge_service()->window_manager_instance();
+ arc_bridge_service()->window_manager()->instance();
if (!wm_instance || wm_mode == current_mode_) {
return;
}
« no previous file with comments | « components/arc/window_manager/arc_window_manager_bridge.h ('k') | ui/arc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698