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

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

Issue 9463022: Minimized panels should not open on Windows when activated by the OS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed unnecessary include Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/panels/docked_panel_strip.cc » ('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/detached_panel_strip.h" 5 #include "chrome/browser/ui/panels/detached_panel_strip.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/ui/panels/panel_drag_controller.h" 9 #include "chrome/browser/ui/panels/panel_drag_controller.h"
10 #include "chrome/browser/ui/panels/panel_manager.h" 10 #include "chrome/browser/ui/panels/panel_manager.h"
(...skipping 17 matching lines...) Expand all
28 28
29 RefreshLayout(); 29 RefreshLayout();
30 } 30 }
31 31
32 void DetachedPanelStrip::RefreshLayout() { 32 void DetachedPanelStrip::RefreshLayout() {
33 NOTIMPLEMENTED(); 33 NOTIMPLEMENTED();
34 } 34 }
35 35
36 void DetachedPanelStrip::AddPanel(Panel* panel) { 36 void DetachedPanelStrip::AddPanel(Panel* panel) {
37 DCHECK_NE(this, panel->panel_strip()); 37 DCHECK_NE(this, panel->panel_strip());
38 panel->set_panel_strip(this); 38 panel->SetPanelStrip(this);
39 panels_.insert(panel); 39 panels_.insert(panel);
40 } 40 }
41 41
42 void DetachedPanelStrip::RemovePanel(Panel* panel) { 42 void DetachedPanelStrip::RemovePanel(Panel* panel) {
43 DCHECK_EQ(this, panel->panel_strip()); 43 DCHECK_EQ(this, panel->panel_strip());
44 panel->set_panel_strip(NULL); 44 panel->SetPanelStrip(NULL);
45 panels_.erase(panel); 45 panels_.erase(panel);
46 } 46 }
47 47
48 void DetachedPanelStrip::CloseAll() { 48 void DetachedPanelStrip::CloseAll() {
49 // Make a copy as closing panels can modify the iterator. 49 // Make a copy as closing panels can modify the iterator.
50 Panels panels_copy = panels_; 50 Panels panels_copy = panels_;
51 51
52 for (Panels::const_iterator iter = panels_copy.begin(); 52 for (Panels::const_iterator iter = panels_copy.begin();
53 iter != panels_copy.end(); ++iter) 53 iter != panels_copy.end(); ++iter)
54 (*iter)->Close(); 54 (*iter)->Close();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 gfx::Rect new_bounds(panel->GetBounds()); 110 gfx::Rect new_bounds(panel->GetBounds());
111 new_bounds.set_origin( 111 new_bounds.set_origin(
112 panel_manager_->drag_controller()->dragging_panel_original_position()); 112 panel_manager_->drag_controller()->dragging_panel_original_position());
113 panel->SetPanelBounds(new_bounds); 113 panel->SetPanelBounds(new_bounds);
114 } 114 }
115 } 115 }
116 116
117 bool DetachedPanelStrip::HasPanel(Panel* panel) const { 117 bool DetachedPanelStrip::HasPanel(Panel* panel) const {
118 return panels_.find(panel) != panels_.end(); 118 return panels_.find(panel) != panels_.end();
119 } 119 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/docked_panel_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698