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

Side by Side Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback Created 3 years, 11 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 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> 6 #include <string>
7 7
8 #include "ash/aura/wm_window_aura.h"
9 #include "ash/common/shelf/shelf_delegate.h" 8 #include "ash/common/shelf/shelf_delegate.h"
10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 9 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
11 #include "ash/common/wm/window_state.h" 10 #include "ash/common/wm/window_state.h"
12 #include "ash/common/wm_lookup.h" 11 #include "ash/common/wm_lookup.h"
13 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
13 #include "ash/common/wm_window.h"
14 #include "ash/common/wm_window_property.h" 14 #include "ash/common/wm_window_property.h"
15 #include "ash/display/screen_orientation_controller_chromeos.h" 15 #include "ash/display/screen_orientation_controller_chromeos.h"
16 #include "ash/shared/app_types.h" 16 #include "ash/shared/app_types.h"
17 #include "ash/shell.h" 17 #include "ash/shell.h"
18 #include "ash/wm/window_state_aura.h" 18 #include "ash/wm/window_state_aura.h"
19 #include "ash/wm/window_util.h" 19 #include "ash/wm/window_util.h"
20 #include "base/bind.h" 20 #include "base/bind.h"
21 #include "base/memory/ptr_util.h" 21 #include "base/memory/ptr_util.h"
22 #include "chrome/browser/chromeos/arc/arc_session_manager.h" 22 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
23 #include "chrome/browser/chromeos/arc/arc_support_host.h" 23 #include "chrome/browser/chromeos/arc/arc_support_host.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 return; 416 return;
417 } 417 }
418 418
419 views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window); 419 views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
420 DCHECK(widget); 420 DCHECK(widget);
421 DCHECK(!info->app_window()); 421 DCHECK(!info->app_window());
422 info->set_app_window( 422 info->set_app_window(
423 base::MakeUnique<AppWindow>(task_id, info->app_shelf_id(), widget, this)); 423 base::MakeUnique<AppWindow>(task_id, info->app_shelf_id(), widget, this));
424 RegisterApp(info); 424 RegisterApp(info);
425 DCHECK(info->app_window()->controller()); 425 DCHECK(info->app_window()->controller());
426 ash::WmWindowAura::Get(window)->SetIntProperty( 426 ash::WmWindow::Get(window)->SetIntProperty(ash::WmWindowProperty::SHELF_ID,
427 ash::WmWindowProperty::SHELF_ID, info->app_window()->shelf_id()); 427 info->app_window()->shelf_id());
428 if (ash::WmShell::Get() 428 if (ash::WmShell::Get()
429 ->maximize_mode_controller() 429 ->maximize_mode_controller()
430 ->IsMaximizeModeWindowManagerEnabled()) { 430 ->IsMaximizeModeWindowManagerEnabled()) {
431 SetOrientationLockForAppWindow(info->app_window()); 431 SetOrientationLockForAppWindow(info->app_window());
432 } 432 }
433 } 433 }
434 434
435 void ArcAppWindowLauncherController::OnAppReadyChanged( 435 void ArcAppWindowLauncherController::OnAppReadyChanged(
436 const std::string& arc_app_id, 436 const std::string& arc_app_id,
437 bool ready) { 437 bool ready) {
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 const std::string arc_app_id = exo::ShellSurface::GetApplicationId(window); 720 const std::string arc_app_id = exo::ShellSurface::GetApplicationId(window);
721 if (arc_app_id.empty()) 721 if (arc_app_id.empty())
722 return -1; 722 return -1;
723 723
724 int task_id = -1; 724 int task_id = -1;
725 if (sscanf(arc_app_id.c_str(), "org.chromium.arc.%d", &task_id) != 1) 725 if (sscanf(arc_app_id.c_str(), "org.chromium.arc.%d", &task_id) != 1)
726 return -1; 726 return -1;
727 727
728 return task_id; 728 return task_id;
729 } 729 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698