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

Side by Side Diff: ash/display/display_controller_unittest.cc

Issue 1151133003: Added an ActivationReason parameter to ActivationChangeObserver::OnWindowActivated(...). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded diff based on dependant CL. Created 5 years, 6 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 (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 "ash/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/display_info.h" 8 #include "ash/display/display_info.h"
9 #include "ash/display/display_layout_store.h" 9 #include "ash/display/display_layout_store.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void OnDisplayAdded(const gfx::Display& new_display) override {} 107 void OnDisplayAdded(const gfx::Display& new_display) override {}
108 void OnDisplayRemoved(const gfx::Display& old_display) override {} 108 void OnDisplayRemoved(const gfx::Display& old_display) override {}
109 109
110 // Overridden from aura::client::FocusChangeObserver 110 // Overridden from aura::client::FocusChangeObserver
111 void OnWindowFocused(aura::Window* gained_focus, 111 void OnWindowFocused(aura::Window* gained_focus,
112 aura::Window* lost_focus) override { 112 aura::Window* lost_focus) override {
113 focus_changed_count_++; 113 focus_changed_count_++;
114 } 114 }
115 115
116 // Overridden from aura::client::ActivationChangeObserver 116 // Overridden from aura::client::ActivationChangeObserver
117 void OnWindowActivated(aura::Window* gained_active, 117 void OnWindowActivated(
118 aura::Window* lost_active) override { 118 aura::client::ActivationChangeObserver::ActivationReason reason,
119 aura::Window* gained_active,
120 aura::Window* lost_active) override {
119 activation_changed_count_++; 121 activation_changed_count_++;
120 } 122 }
121 void OnAttemptToReactivateWindow(aura::Window* request_active, 123 void OnAttemptToReactivateWindow(aura::Window* request_active,
122 aura::Window* actual_active) override {} 124 aura::Window* actual_active) override {}
123 125
124 int CountAndReset() { 126 int CountAndReset() {
125 EXPECT_EQ(changing_count_, changed_count_); 127 EXPECT_EQ(changing_count_, changed_count_);
126 changed_count_ = 0; 128 changed_count_ = 0;
127 return Resetter<int>(&changing_count_).value(); 129 return Resetter<int>(&changing_count_).value();
128 } 130 }
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 widget->GetNativeWindow()->GetRootWindow()); 1452 widget->GetNativeWindow()->GetRootWindow());
1451 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); 1453 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow());
1452 1454
1453 UpdateDisplay("300x300"); 1455 UpdateDisplay("300x300");
1454 watcher.Stop(); 1456 watcher.Stop();
1455 1457
1456 widget->CloseNow(); 1458 widget->CloseNow();
1457 } 1459 }
1458 1460
1459 } // namespace ash 1461 } // namespace ash
OLDNEW
« no previous file with comments | « ash/content/display/screen_orientation_controller_chromeos.cc ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698