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

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

Issue 10260028: Update Panel mininimize/restore button on strip and expansion state change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback changes 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/native_panel.h ('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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 NativePanel* native_panel() { return native_panel_; } 235 NativePanel* native_panel() { return native_panel_; }
236 Browser* browser() const { return browser_; } 236 Browser* browser() const { return browser_; }
237 237
238 // May be NULL if: 238 // May be NULL if:
239 // * panel is newly created and has not been positioned yet. 239 // * panel is newly created and has not been positioned yet.
240 // * panel is being closed asynchronously. 240 // * panel is being closed asynchronously.
241 // Please use it with caution. 241 // Please use it with caution.
242 PanelStrip* panel_strip() const { return panel_strip_; } 242 PanelStrip* panel_strip() const { return panel_strip_; }
243 243
244 // Sets the current panel strip that contains this panel. 244 // Sets the current panel strip that contains this panel.
245 void SetPanelStrip(PanelStrip* new_strip); 245 void set_panel_strip(PanelStrip* new_strip) { panel_strip_ = new_strip; }
246 246
247 ExpansionState expansion_state() const { return expansion_state_; } 247 ExpansionState expansion_state() const { return expansion_state_; }
248 const gfx::Size& min_size() const { return min_size_; } 248 const gfx::Size& min_size() const { return min_size_; }
249 const gfx::Size& max_size() const { return max_size_; } 249 const gfx::Size& max_size() const { return max_size_; }
250 bool auto_resizable() const { return auto_resizable_; } 250 bool auto_resizable() const { return auto_resizable_; }
251 251
252 bool in_preview_mode() const { return in_preview_mode_; } 252 bool in_preview_mode() const { return in_preview_mode_; }
253 253
254 panel::Resizability CanResizeByMouse() const; 254 panel::Resizability CanResizeByMouse() const;
255 255
(...skipping 20 matching lines...) Expand all
276 276
277 // Updates the panel bounds instantly without any animation. 277 // Updates the panel bounds instantly without any animation.
278 void SetPanelBoundsInstantly(const gfx::Rect& bounds); 278 void SetPanelBoundsInstantly(const gfx::Rect& bounds);
279 279
280 // Sets whether the panel will auto resize according to its content. 280 // Sets whether the panel will auto resize according to its content.
281 void SetAutoResizable(bool resizable); 281 void SetAutoResizable(bool resizable);
282 282
283 // Sets minimum and maximum size for the panel. 283 // Sets minimum and maximum size for the panel.
284 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size); 284 void SetSizeRange(const gfx::Size& min_size, const gfx::Size& max_size);
285 285
286 // Sets whether the panel app icon is visible in the taskbar.
287 void SetAppIconVisibility(bool visible);
288
289 // Whether the panel window is always on top. 286 // Whether the panel window is always on top.
290 void SetAlwaysOnTop(bool on_top); 287 void SetAlwaysOnTop(bool on_top);
291 bool always_on_top() const { return always_on_top_; } 288 bool always_on_top() const { return always_on_top_; }
292 289
293 // Sets whether the panel is shown in preview mode. When the panel is 290 // Sets whether the panel is shown in preview mode. When the panel is
294 // being dragged, it is in preview mode. 291 // being dragged, it is in preview mode.
295 void SetPreviewMode(bool in_preview_mode); 292 void SetPreviewMode(bool in_preview_mode);
296 293
297 // Sets up the panel for being resizable by the user - for example, 294 // Sets up the panel for being resizable by the user - for example,
298 // enables the resize mouse cursors when mouse is hovering over the edges. 295 // enables the resize mouse cursors when mouse is hovering over the edges.
299 void EnableResizeByMouse(bool enable); 296 void EnableResizeByMouse(bool enable);
300 297
298 // Sets whether the minimize or restore button, if any, are visible.
299 void UpdateMinimizeRestoreButtonVisibility();
300
301 // Changes the preferred size to acceptable based on min_size() and max_size() 301 // Changes the preferred size to acceptable based on min_size() and max_size()
302 gfx::Size ClampSize(const gfx::Size& size) const; 302 gfx::Size ClampSize(const gfx::Size& size) const;
303 303
304 // Called when the panel's active state changes. 304 // Called when the panel's active state changes.
305 // |active| is true if panel became active. 305 // |active| is true if panel became active.
306 void OnActiveStateChanged(bool active); 306 void OnActiveStateChanged(bool active);
307 307
308 protected: 308 protected:
309 virtual void DestroyBrowser() OVERRIDE; 309 virtual void DestroyBrowser() OVERRIDE;
310 310
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 AttentionMode attention_mode_; 363 AttentionMode attention_mode_;
364 364
365 ExpansionState expansion_state_; 365 ExpansionState expansion_state_;
366 366
367 content::NotificationRegistrar registrar_; 367 content::NotificationRegistrar registrar_;
368 368
369 DISALLOW_COPY_AND_ASSIGN(Panel); 369 DISALLOW_COPY_AND_ASSIGN(Panel);
370 }; 370 };
371 371
372 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ 372 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/native_panel.h ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698