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

Side by Side Diff: chrome/browser/ui/panels/panel.h

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: fix win compile Created 8 years, 7 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.cc ('k') | chrome/browser/ui/panels/panel.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 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // a) it does not go on top when some app enters full screen mode. 72 // a) it does not go on top when some app enters full screen mode.
73 // b) it remains on top when an app exits full screen mode. 73 // b) it remains on top when an app exits full screen mode.
74 void FullScreenModeChanged(bool is_full_screen); 74 void FullScreenModeChanged(bool is_full_screen);
75 75
76 // Ensures that the panel is fully visible, that is, not obscured by other 76 // Ensures that the panel is fully visible, that is, not obscured by other
77 // top-most windows. 77 // top-most windows.
78 void EnsureFullyVisible(); 78 void EnsureFullyVisible();
79 79
80 int TitleOnlyHeight() const; 80 int TitleOnlyHeight() const;
81 81
82 // Returns the size of the panel when it is iconified, as shown on the
83 // overflow area.
84 gfx::Size IconOnlySize() const;
85
86 // Returns true if the panel can be minimized or restored, depending on the 82 // Returns true if the panel can be minimized or restored, depending on the
87 // strip the panel is in. 83 // strip the panel is in.
88 bool CanMinimize() const; 84 bool CanMinimize() const;
89 bool CanRestore() const; 85 bool CanRestore() const;
90 86
91 // BrowserWindow overrides. 87 // BrowserWindow overrides.
92 virtual void Show() OVERRIDE; 88 virtual void Show() OVERRIDE;
93 virtual void ShowInactive() OVERRIDE; 89 virtual void ShowInactive() OVERRIDE;
94 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 90 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
95 virtual void Close() OVERRIDE; 91 virtual void Close() OVERRIDE;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 void SetPreviewMode(bool in_preview_mode); 293 void SetPreviewMode(bool in_preview_mode);
298 294
299 // Sets up the panel for being resizable by the user - for example, 295 // Sets up the panel for being resizable by the user - for example,
300 // enables the resize mouse cursors when mouse is hovering over the edges. 296 // enables the resize mouse cursors when mouse is hovering over the edges.
301 void EnableResizeByMouse(bool enable); 297 void EnableResizeByMouse(bool enable);
302 298
303 // Changes the preferred size to acceptable based on min_size() and max_size() 299 // Changes the preferred size to acceptable based on min_size() and max_size()
304 void ClampSize(gfx::Size* size) const; 300 void ClampSize(gfx::Size* size) const;
305 301
306 // Called when the panel's active state changes. 302 // Called when the panel's active state changes.
307 void OnActiveStateChanged(); 303 // |active| is true if panel became active.
304 void OnActiveStateChanged(bool active);
308 305
309 protected: 306 protected:
310 virtual void DestroyBrowser() OVERRIDE; 307 virtual void DestroyBrowser() OVERRIDE;
311 308
312 private: 309 private:
313 friend class PanelManager; 310 friend class PanelManager;
314 friend class PanelBrowserTest; 311 friend class PanelBrowserTest;
315 FRIEND_TEST_ALL_PREFIXES(PanelBrowserTest, RestoredBounds); 312 FRIEND_TEST_ALL_PREFIXES(PanelBrowserTest, RestoredBounds);
316 313
317 // Panel can only be created using PanelManager::CreatePanel(). 314 // Panel can only be created using PanelManager::CreatePanel().
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 AttentionMode attention_mode_; 361 AttentionMode attention_mode_;
365 362
366 ExpansionState expansion_state_; 363 ExpansionState expansion_state_;
367 364
368 content::NotificationRegistrar registrar_; 365 content::NotificationRegistrar registrar_;
369 366
370 DISALLOW_COPY_AND_ASSIGN(Panel); 367 DISALLOW_COPY_AND_ASSIGN(Panel);
371 }; 368 };
372 369
373 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ 370 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/docked_panel_strip.cc ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698