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

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

Issue 10908153: [Panel refactor] Deprecate old panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux_chromeos test failure Created 8 years, 3 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 | « chrome/browser/ui/panels/docked_panel_strip.h ('k') | chrome/browser/ui/panels/native_panel.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/docked_panel_strip.h" 5 #include "chrome/browser/ui/panels/docked_panel_strip.h"
6 6
7 #include <math.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 #include <vector> 10 #include <vector>
9 11
10 #include "base/auto_reset.h" 12 #include "base/auto_reset.h"
11 #include "base/bind.h" 13 #include "base/bind.h"
12 #include "base/logging.h" 14 #include "base/logging.h"
13 #include "base/message_loop.h" 15 #include "base/message_loop.h"
14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/panels/panel_manager.h" 16 #include "chrome/browser/ui/panels/panel_manager.h"
16 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" 17 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
17 #include "chrome/common/chrome_notification_types.h" 18 #include "chrome/common/chrome_notification_types.h"
18 #include "content/public/browser/notification_service.h" 19 #include "content/public/browser/notification_service.h"
19 #include "content/public/browser/notification_source.h" 20 #include "content/public/browser/notification_source.h"
20 21
21 namespace { 22 namespace {
22 // Occasionally some system, like Windows, might not bring up or down the bottom 23 // Occasionally some system, like Windows, might not bring up or down the bottom
23 // bar when the mouse enters or leaves the bottom screen area. This is the 24 // bar when the mouse enters or leaves the bottom screen area. This is the
24 // maximum time we will wait for the bottom bar visibility change notification. 25 // maximum time we will wait for the bottom bar visibility change notification.
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 void DockedPanelStrip::OnPanelActiveStateChanged(Panel* panel) { 861 void DockedPanelStrip::OnPanelActiveStateChanged(Panel* panel) {
861 // Refresh layout, but wait till active states settle. 862 // Refresh layout, but wait till active states settle.
862 // This lets us avoid refreshing too many times when one panel loses 863 // This lets us avoid refreshing too many times when one panel loses
863 // focus and another gains it. 864 // focus and another gains it.
864 ScheduleLayoutRefresh(); 865 ScheduleLayoutRefresh();
865 } 866 }
866 867
867 bool DockedPanelStrip::HasPanel(Panel* panel) const { 868 bool DockedPanelStrip::HasPanel(Panel* panel) const {
868 return find(panels_.begin(), panels_.end(), panel) != panels_.end(); 869 return find(panels_.begin(), panels_.end(), panel) != panels_.end();
869 } 870 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/docked_panel_strip.h ('k') | chrome/browser/ui/panels/native_panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698