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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First cut for review/trybots Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_status_monitor.h" 5 #include "chrome/browser/ui/ash/launcher/browser_status_monitor.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll er.h" 10 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll er.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 UpdateBrowserItemState(); 174 UpdateBrowserItemState();
175 } 175 }
176 176
177 void BrowserStatusMonitor::OnDisplayBoundsChanged( 177 void BrowserStatusMonitor::OnDisplayBoundsChanged(
178 const gfx::Display& display) { 178 const gfx::Display& display) {
179 // Do nothing here. 179 // Do nothing here.
180 } 180 }
181 181
182 void BrowserStatusMonitor::OnDisplayAdded(const gfx::Display& new_display) { 182 void BrowserStatusMonitor::OnDisplayAdded(const gfx::Display& new_display) {
183 // Add a new RootWindow and its ActivationClient to observed list. 183 // Add a new RootWindow and its ActivationClient to observed list.
184 aura::RootWindow* root_window = ash::Shell::GetInstance()-> 184 aura::Window* root_window = ash::Shell::GetInstance()->
185 display_controller()->GetRootWindowForDisplayId(new_display.id()); 185 display_controller()->GetRootWindowForDisplayId(new_display.id());
186 // When the primary root window's display get removed, the existing root 186 // When the primary root window's display get removed, the existing root
187 // window is taken over by the new display and the observer is already set. 187 // window is taken over by the new display and the observer is already set.
188 if (!observed_root_windows_.IsObserving(root_window)) { 188 if (!observed_root_windows_.IsObserving(root_window)) {
189 observed_root_windows_.Add(static_cast<aura::Window*>(root_window)); 189 observed_root_windows_.Add(static_cast<aura::Window*>(root_window));
190 observed_activation_clients_.Add( 190 observed_activation_clients_.Add(
191 aura::client::GetActivationClient(root_window)); 191 aura::client::GetActivationClient(root_window));
192 } 192 }
193 } 193 }
194 194
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 } 280 }
281 281
282 void BrowserStatusMonitor::RemoveWebContentsObserver( 282 void BrowserStatusMonitor::RemoveWebContentsObserver(
283 content::WebContents* contents) { 283 content::WebContents* contents) {
284 DCHECK(webcontents_to_observer_map_.find(contents) != 284 DCHECK(webcontents_to_observer_map_.find(contents) !=
285 webcontents_to_observer_map_.end()); 285 webcontents_to_observer_map_.end());
286 delete webcontents_to_observer_map_[contents]; 286 delete webcontents_to_observer_map_[contents];
287 webcontents_to_observer_map_.erase(contents); 287 webcontents_to_observer_map_.erase(contents);
288 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698