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

Side by Side Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.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, 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 | « chrome/browser/ui/app_list/arc/arc_app_utils.cc ('k') | components/arc.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" 4 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h"
5 5
6 #include <string>
7
6 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
7 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
8 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
9 #include "ash/display/screen_orientation_controller_chromeos.h" 11 #include "ash/display/screen_orientation_controller_chromeos.h"
10 #include "ash/shelf/shelf_delegate.h" 12 #include "ash/shelf/shelf_delegate.h"
11 #include "ash/shelf/shelf_util.h" 13 #include "ash/shelf/shelf_util.h"
12 #include "ash/shell.h" 14 #include "ash/shell.h"
13 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 15 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
14 #include "ash/wm/window_state_aura.h" 16 #include "ash/wm/window_state_aura.h"
15 #include "ash/wm/window_util.h" 17 #include "ash/wm/window_util.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 206 }
205 207
206 bool has_requested_orientation_lock() const { 208 bool has_requested_orientation_lock() const {
207 return has_requested_orientation_lock_; 209 return has_requested_orientation_lock_;
208 } 210 }
209 211
210 private: 212 private:
211 arc::mojom::AppInstance* GetAppInstance() { 213 arc::mojom::AppInstance* GetAppInstance() {
212 arc::ArcBridgeService* bridge_service = arc::ArcBridgeService::Get(); 214 arc::ArcBridgeService* bridge_service = arc::ArcBridgeService::Get();
213 arc::mojom::AppInstance* app_instance = 215 arc::mojom::AppInstance* app_instance =
214 bridge_service ? bridge_service->app_instance() : nullptr; 216 bridge_service ? bridge_service->app()->instance() : nullptr;
215 if (!app_instance) { 217 if (!app_instance) {
216 VLOG(2) << "Arc Bridge is not available."; 218 VLOG(2) << "Arc Bridge is not available.";
217 return nullptr; 219 return nullptr;
218 } 220 }
219 221
220 if (bridge_service->app_version() < 3) { 222 if (bridge_service->app()->version() < 3) {
221 VLOG(2) << "Arc Bridge has old version for apps." 223 VLOG(2) << "Arc Bridge has old version for apps."
222 << bridge_service->app_version(); 224 << bridge_service->app()->version();
223 return nullptr; 225 return nullptr;
224 } 226 }
225 return app_instance; 227 return app_instance;
226 } 228 }
227 229
228 int task_id_; 230 int task_id_;
229 ash::ShelfID shelf_id_ = 0; 231 ash::ShelfID shelf_id_ = 0;
230 std::string app_id_; 232 std::string app_id_;
231 FullScreenMode fullscreen_mode_ = FullScreenMode::NOT_DEFINED; 233 FullScreenMode fullscreen_mode_ = FullScreenMode::NOT_DEFINED;
232 // Unowned pointers 234 // Unowned pointers
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 600
599 if (orientation_lock == arc::mojom::OrientationLock::CURRENT) { 601 if (orientation_lock == arc::mojom::OrientationLock::CURRENT) {
600 // Resolve the orientation when it first resolved. 602 // Resolve the orientation when it first resolved.
601 orientation_lock = GetCurrentOrientation(); 603 orientation_lock = GetCurrentOrientation();
602 app_window->set_requested_orientation_lock(orientation_lock); 604 app_window->set_requested_orientation_lock(orientation_lock);
603 } 605 }
604 606
605 shell->screen_orientation_controller()->LockOrientationForWindow( 607 shell->screen_orientation_controller()->LockOrientationForWindow(
606 window, BlinkOrientationLockFromMojom(orientation_lock)); 608 window, BlinkOrientationLockFromMojom(orientation_lock));
607 } 609 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_utils.cc ('k') | components/arc.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698