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

Side by Side Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 10777004: Support chrome.windows extension API events for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | 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/panels/panel_manager.h" 5 #include "chrome/browser/ui/panels/panel_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 panel->SetAutoResizable(true); 205 panel->SetAutoResizable(true);
206 } 206 }
207 207
208 // Add the panel to the docked strip. 208 // Add the panel to the docked strip.
209 // Delay layout refreshes in case multiple panels are created within 209 // Delay layout refreshes in case multiple panels are created within
210 // a short time of one another or the focus changes shortly after panel 210 // a short time of one another or the focus changes shortly after panel
211 // is created to avoid excessive screen redraws. 211 // is created to avoid excessive screen redraws.
212 docked_strip_->AddPanel(panel, PanelStrip::DELAY_LAYOUT_REFRESH); 212 docked_strip_->AddPanel(panel, PanelStrip::DELAY_LAYOUT_REFRESH);
213 docked_strip_->UpdatePanelOnStripChange(panel); 213 docked_strip_->UpdatePanelOnStripChange(panel);
214 214
215 content::NotificationService::current()->Notify(
216 chrome::NOTIFICATION_PANEL_OPENED,
217 content::Source<Panel>(panel),
218 content::NotificationService::NoDetails());
219
215 return panel; 220 return panel;
216 } 221 }
217 222
218 void PanelManager::OnPanelClosed(Panel* panel) { 223 void PanelManager::OnPanelClosed(Panel* panel) {
219 if (num_panels() == 1) { 224 if (num_panels() == 1) {
220 display_settings_provider_->RemoveFullScreenObserver(this); 225 display_settings_provider_->RemoveFullScreenObserver(this);
221 } 226 }
222 227
223 drag_controller_->OnPanelClosed(panel); 228 drag_controller_->OnPanelClosed(panel);
224 resize_controller_->OnPanelClosed(panel); 229 resize_controller_->OnPanelClosed(panel);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 353 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
349 panel_mouse_watcher_.reset(watcher); 354 panel_mouse_watcher_.reset(watcher);
350 } 355 }
351 356
352 void PanelManager::OnPanelAnimationEnded(Panel* panel) { 357 void PanelManager::OnPanelAnimationEnded(Panel* panel) {
353 content::NotificationService::current()->Notify( 358 content::NotificationService::current()->Notify(
354 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, 359 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
355 content::Source<Panel>(panel), 360 content::Source<Panel>(panel),
356 content::NotificationService::NoDetails()); 361 content::NotificationService::NoDetails());
357 } 362 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698