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

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

Issue 2839933005: mash: Merge ChromeLauncherController and *Impl subclass. (Closed)
Patch Set: Address comments. Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" 8 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h"
9 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" 9 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
10 #include "ui/wm/public/activation_client.h" 10 #include "ui/wm/public/activation_client.h"
11 11
12 AppWindowLauncherController::AppWindowLauncherController( 12 AppWindowLauncherController::AppWindowLauncherController(
13 ChromeLauncherControllerImpl* owner) 13 ChromeLauncherController* owner)
14 : owner_(owner) { 14 : owner_(owner) {
15 if (ash::Shell::HasInstance()) { 15 if (ash::Shell::HasInstance()) {
16 if (ash::Shell::Get()->GetPrimaryRootWindow()) { 16 if (ash::Shell::Get()->GetPrimaryRootWindow()) {
17 activation_client_ = aura::client::GetActivationClient( 17 activation_client_ = aura::client::GetActivationClient(
18 ash::Shell::Get()->GetPrimaryRootWindow()); 18 ash::Shell::Get()->GetPrimaryRootWindow());
19 if (activation_client_) 19 if (activation_client_)
20 activation_client_->AddObserver(this); 20 activation_client_->AddObserver(this);
21 } 21 }
22 } 22 }
23 } 23 }
(...skipping 14 matching lines...) Expand all
38 new_controller->SetActiveWindow(new_active); 38 new_controller->SetActiveWindow(new_active);
39 owner_->SetItemStatus(new_controller->shelf_id(), ash::STATUS_ACTIVE); 39 owner_->SetItemStatus(new_controller->shelf_id(), ash::STATUS_ACTIVE);
40 } 40 }
41 41
42 // Mark the old active window's launcher item as running (if different). 42 // Mark the old active window's launcher item as running (if different).
43 AppWindowLauncherItemController* old_controller = 43 AppWindowLauncherItemController* old_controller =
44 ControllerForWindow(old_active); 44 ControllerForWindow(old_active);
45 if (old_controller && old_controller != new_controller) 45 if (old_controller && old_controller != new_controller)
46 owner_->SetItemStatus(old_controller->shelf_id(), ash::STATUS_RUNNING); 46 owner_->SetItemStatus(old_controller->shelf_id(), ash::STATUS_RUNNING);
47 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698