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

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

Issue 11434062: Revert 170550 - Revert 170477 - Removes the |event| parameter from ActivationDelegate::ShouldActiva… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser_launcher_item_controller.h" 5 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/launcher/launcher_model.h" 10 #include "ash/launcher/launcher_model.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 ash::LauncherItem GetUpdaterItem() { 154 ash::LauncherItem GetUpdaterItem() {
155 ash::LauncherID launcher_id = 155 ash::LauncherID launcher_id =
156 BrowserLauncherItemController::TestApi(&updater).item_id(); 156 BrowserLauncherItemController::TestApi(&updater).item_id();
157 int index = launcher_test->launcher_model_->ItemIndexByID(launcher_id); 157 int index = launcher_test->launcher_model_->ItemIndexByID(launcher_id);
158 return launcher_test->launcher_model_->items()[index]; 158 return launcher_test->launcher_model_->items()[index];
159 } 159 }
160 160
161 // aura::client::ActivationDelegate overrides. 161 // aura::client::ActivationDelegate overrides.
162 virtual bool ShouldActivate(const ui::Event* event) OVERRIDE { 162 virtual bool ShouldActivate() const OVERRIDE {
163 return true; 163 return true;
164 } 164 }
165 virtual void OnActivated() OVERRIDE { 165 virtual void OnActivated() OVERRIDE {
166 updater.BrowserActivationStateChanged(); 166 updater.BrowserActivationStateChanged();
167 } 167 }
168 virtual void OnLostActive() OVERRIDE { 168 virtual void OnLostActive() OVERRIDE {
169 updater.BrowserActivationStateChanged(); 169 updater.BrowserActivationStateChanged();
170 } 170 }
171 171
172 BrowserLauncherItemControllerTest* launcher_test; 172 BrowserLauncherItemControllerTest* launcher_test;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 EXPECT_EQ(ash::STATUS_RUNNING, app_state.GetUpdaterItem().status); 418 EXPECT_EQ(ash::STATUS_RUNNING, app_state.GetUpdaterItem().status);
419 419
420 // App window should go to attention state. 420 // App window should go to attention state.
421 app_state.window.SetProperty(aura::client::kDrawAttentionKey, true); 421 app_state.window.SetProperty(aura::client::kDrawAttentionKey, true);
422 EXPECT_EQ(ash::STATUS_ATTENTION, app_state.GetUpdaterItem().status); 422 EXPECT_EQ(ash::STATUS_ATTENTION, app_state.GetUpdaterItem().status);
423 423
424 // Activating app window should clear attention state. 424 // Activating app window should clear attention state.
425 activation_client_->ActivateWindow(&app_state.window); 425 activation_client_->ActivateWindow(&app_state.window);
426 EXPECT_EQ(ash::STATUS_ACTIVE, app_state.GetUpdaterItem().status); 426 EXPECT_EQ(ash::STATUS_ACTIVE, app_state.GetUpdaterItem().status);
427 } 427 }
OLDNEW
« no previous file with comments | « ash/wm/activation_controller.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698