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

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

Issue 10106008: Change Panel titlebars to activate the panel on click (rather than minimize). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GTK changes Created 8 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 void DetachedPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { 60 void DetachedPanelStrip::OnPanelAttentionStateChanged(Panel* panel) {
61 DCHECK_EQ(this, panel->panel_strip()); 61 DCHECK_EQ(this, panel->panel_strip());
62 // Nothing to do. 62 // Nothing to do.
63 } 63 }
64 64
65 void DetachedPanelStrip::OnPanelTitlebarClicked(Panel* panel, 65 void DetachedPanelStrip::OnPanelTitlebarClicked(Panel* panel,
66 panel::ClickModifier modifier) { 66 panel::ClickModifier modifier) {
67 DCHECK_EQ(this, panel->panel_strip()); 67 DCHECK_EQ(this, panel->panel_strip());
68 // Click on detached panel titlebars does not do anything. 68 panel->Activate();
Dmitry Titov 2012/04/18 01:49:46 See the comment in the same method of the DockStri
jennb 2012/04/24 18:47:14 Reverted.
69 } 69 }
70 70
71 void DetachedPanelStrip::ResizePanelWindow( 71 void DetachedPanelStrip::ResizePanelWindow(
72 Panel* panel, 72 Panel* panel,
73 const gfx::Size& preferred_window_size) { 73 const gfx::Size& preferred_window_size) {
74 // We should get this call only of we have the panel. 74 // We should get this call only of we have the panel.
75 DCHECK_EQ(this, panel->panel_strip()); 75 DCHECK_EQ(this, panel->panel_strip());
76 76
77 // Make sure the new size does not violate panel's size restrictions. 77 // Make sure the new size does not violate panel's size restrictions.
78 gfx::Size new_size(preferred_window_size.width(), 78 gfx::Size new_size(preferred_window_size.width(),
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return panels_.find(panel) != panels_.end(); 179 return panels_.find(panel) != panels_.end();
180 } 180 }
181 181
182 void DetachedPanelStrip::UpdatePanelOnStripChange(Panel* panel) { 182 void DetachedPanelStrip::UpdatePanelOnStripChange(Panel* panel) {
183 panel->set_attention_mode( 183 panel->set_attention_mode(
184 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | 184 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION |
185 Panel::USE_SYSTEM_ATTENTION)); 185 Panel::USE_SYSTEM_ATTENTION));
186 panel->SetAlwaysOnTop(false); 186 panel->SetAlwaysOnTop(false);
187 panel->EnableResizeByMouse(true); 187 panel->EnableResizeByMouse(true);
188 } 188 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/docked_panel_strip.cc » ('j') | chrome/browser/ui/panels/docked_panel_strip.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698