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

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

Issue 13999008: Remove native_stack accessor from StackedPanelCollection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/panels/stacked_panel_collection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "chrome/browser/ui/panels/detached_panel_collection.h" 12 #include "chrome/browser/ui/panels/detached_panel_collection.h"
13 #include "chrome/browser/ui/panels/docked_panel_collection.h" 13 #include "chrome/browser/ui/panels/docked_panel_collection.h"
14 #include "chrome/browser/ui/panels/native_panel_stack_window.h"
15 #include "chrome/browser/ui/panels/panel_drag_controller.h" 14 #include "chrome/browser/ui/panels/panel_drag_controller.h"
16 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" 15 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
17 #include "chrome/browser/ui/panels/panel_resize_controller.h" 16 #include "chrome/browser/ui/panels/panel_resize_controller.h"
18 #include "chrome/browser/ui/panels/stacked_panel_collection.h" 17 #include "chrome/browser/ui/panels/stacked_panel_collection.h"
19 #include "chrome/common/chrome_notification_types.h" 18 #include "chrome/common/chrome_notification_types.h"
20 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/chrome_version_info.h" 20 #include "chrome/common/chrome_version_info.h"
22 #include "content/public/browser/notification_service.h" 21 #include "content/public/browser/notification_service.h"
23 #include "content/public/browser/notification_source.h" 22 #include "content/public/browser/notification_source.h"
24 23
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 StackedPanelCollection* stack = *iter; 317 StackedPanelCollection* stack = *iter;
319 318
320 // Do not add to other stack that is from differnt extension or profile. 319 // Do not add to other stack that is from differnt extension or profile.
321 // Note that the check is based on bottom panel. 320 // Note that the check is based on bottom panel.
322 Panel* panel = stack->bottom_panel(); 321 Panel* panel = stack->bottom_panel();
323 if (panel->profile() != new_panel->profile() || 322 if (panel->profile() != new_panel->profile() ||
324 panel->extension_id() != new_panel->extension_id()) 323 panel->extension_id() != new_panel->extension_id())
325 continue; 324 continue;
326 325
327 // Do not add to the stack that is minimized by the system. 326 // Do not add to the stack that is minimized by the system.
328 if (stack->native_stack()->IsMinimized()) 327 if (stack->IsMinimized())
329 continue; 328 continue;
330 329
331 if (bounds.height() <= stack->GetMaximiumAvailableBottomSpace()) { 330 if (bounds.height() <= stack->GetMaximiumAvailableBottomSpace()) {
332 *positioning_mask = static_cast<PanelCollection::PositioningMask>( 331 *positioning_mask = static_cast<PanelCollection::PositioningMask>(
333 *positioning_mask | PanelCollection::COLLAPSE_TO_FIT); 332 *positioning_mask | PanelCollection::COLLAPSE_TO_FIT);
334 return stack; 333 return stack;
335 } 334 }
336 } 335 }
337 } 336 }
338 337
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 549 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
551 panel_mouse_watcher_.reset(watcher); 550 panel_mouse_watcher_.reset(watcher);
552 } 551 }
553 552
554 void PanelManager::OnPanelAnimationEnded(Panel* panel) { 553 void PanelManager::OnPanelAnimationEnded(Panel* panel) {
555 content::NotificationService::current()->Notify( 554 content::NotificationService::current()->Notify(
556 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED, 555 chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
557 content::Source<Panel>(panel), 556 content::Source<Panel>(panel),
558 content::NotificationService::NoDetails()); 557 content::NotificationService::NoDetails());
559 } 558 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/stacked_panel_collection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698