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

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

Issue 2113633002: Not set the title of ARC apps from launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 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 "ash/common/wm/window_state.h" 6 #include "ash/common/wm/window_state.h"
7 #include "ash/shelf/shelf_delegate.h" 7 #include "ash/shelf/shelf_delegate.h"
8 #include "ash/shelf/shelf_util.h" 8 #include "ash/shelf/shelf_util.h"
9 #include "ash/wm/window_state_aura.h" 9 #include "ash/wm/window_state_aura.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 int task_id = -1; 282 int task_id = -1;
283 if (sscanf(app_id.c_str(), "org.chromium.arc.%d", &task_id) != 1) 283 if (sscanf(app_id.c_str(), "org.chromium.arc.%d", &task_id) != 1)
284 return; 284 return;
285 285
286 if (task_id) { 286 if (task_id) {
287 AppWindow* app_window = GetAppWindowForTask(task_id); 287 AppWindow* app_window = GetAppWindowForTask(task_id);
288 if (app_window) { 288 if (app_window) {
289 app_window->set_widget(views::Widget::GetWidgetForNativeWindow(window)); 289 app_window->set_widget(views::Widget::GetWidgetForNativeWindow(window));
290 ash::SetShelfIDForWindow(app_window->shelf_id(), window); 290 ash::SetShelfIDForWindow(app_window->shelf_id(), window);
291 if (app_window->controller())
292 window->SetTitle(app_window->controller()->GetTitle());
293 chrome::MultiUserWindowManager::GetInstance()->SetWindowOwner( 291 chrome::MultiUserWindowManager::GetInstance()->SetWindowOwner(
294 window, 292 window,
295 user_manager::UserManager::Get()->GetPrimaryUser()->GetAccountId()); 293 user_manager::UserManager::Get()->GetPrimaryUser()->GetAccountId());
296 } 294 }
297 } 295 }
298 } 296 }
299 297
300 void ArcAppWindowLauncherController::OnAppReadyChanged( 298 void ArcAppWindowLauncherController::OnAppReadyChanged(
301 const std::string& app_id, 299 const std::string& app_id,
302 bool ready) { 300 bool ready) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 468
471 ArcAppWindowLauncherItemController* controller = it->second; 469 ArcAppWindowLauncherItemController* controller = it->second;
472 controller->RemoveWindow(app_window); 470 controller->RemoveWindow(app_window);
473 if (!controller->window_count()) { 471 if (!controller->window_count()) {
474 ash::ShelfID shelf_id = app_window->shelf_id(); 472 ash::ShelfID shelf_id = app_window->shelf_id();
475 owner()->CloseLauncherItem(shelf_id); 473 owner()->CloseLauncherItem(shelf_id);
476 app_controller_map_.erase(it); 474 app_controller_map_.erase(it);
477 } 475 }
478 app_window->ResetController(); 476 app_window->ResetController();
479 } 477 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698