OLD | NEW |
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/docked_panel_collection.h" | 5 #include "chrome/browser/ui/panels/docked_panel_collection.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <queue> | 10 #include <queue> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/auto_reset.h" | 13 #include "base/auto_reset.h" |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "base/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
19 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
20 #include "chrome/browser/ui/panels/panel_drag_controller.h" | 20 #include "chrome/browser/ui/panels/panel_drag_controller.h" |
21 #include "chrome/browser/ui/panels/panel_manager.h" | 21 #include "chrome/browser/ui/panels/panel_manager.h" |
22 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" | 22 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" |
23 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
24 #include "content/public/browser/notification_source.h" | 24 #include "content/public/browser/notification_source.h" |
25 | 25 |
26 namespace { | 26 namespace { |
27 // Width of spacing around panel collection and the left/right edges of the | 27 // Width of spacing around panel collection and the left/right edges of the |
28 // screen. | 28 // screen. |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 const gfx::Rect& requested_bounds) const { | 772 const gfx::Rect& requested_bounds) const { |
773 gfx::Rect initial_bounds = requested_bounds; | 773 gfx::Rect initial_bounds = requested_bounds; |
774 initial_bounds.set_origin( | 774 initial_bounds.set_origin( |
775 GetDefaultPositionForPanel(requested_bounds.size())); | 775 GetDefaultPositionForPanel(requested_bounds.size())); |
776 return initial_bounds; | 776 return initial_bounds; |
777 } | 777 } |
778 | 778 |
779 bool DockedPanelCollection::HasPanel(Panel* panel) const { | 779 bool DockedPanelCollection::HasPanel(Panel* panel) const { |
780 return find(panels_.begin(), panels_.end(), panel) != panels_.end(); | 780 return find(panels_.begin(), panels_.end(), panel) != panels_.end(); |
781 } | 781 } |
OLD | NEW |