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

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

Issue 26427002: Add always-on-top property to app windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 7 years, 2 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 | « chrome/browser/ui/gtk/browser_window_gtk.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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual void ShowInactive() OVERRIDE; 126 virtual void ShowInactive() OVERRIDE;
127 virtual void Close() OVERRIDE; 127 virtual void Close() OVERRIDE;
128 virtual void Activate() OVERRIDE; 128 virtual void Activate() OVERRIDE;
129 virtual void Deactivate() OVERRIDE; 129 virtual void Deactivate() OVERRIDE;
130 virtual void Maximize() OVERRIDE; 130 virtual void Maximize() OVERRIDE;
131 virtual void Minimize() OVERRIDE; 131 virtual void Minimize() OVERRIDE;
132 virtual void Restore() OVERRIDE; 132 virtual void Restore() OVERRIDE;
133 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 133 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
134 virtual void FlashFrame(bool flash) OVERRIDE; 134 virtual void FlashFrame(bool flash) OVERRIDE;
135 virtual bool IsAlwaysOnTop() const OVERRIDE; 135 virtual bool IsAlwaysOnTop() const OVERRIDE;
136 virtual void SetAlwaysOnTop(bool on_top) OVERRIDE;
136 137
137 // Overridden from CommandUpdaterDelegate: 138 // Overridden from CommandUpdaterDelegate:
138 virtual void ExecuteCommandWithDisposition( 139 virtual void ExecuteCommandWithDisposition(
139 int id, 140 int id,
140 WindowOpenDisposition disposition) OVERRIDE; 141 WindowOpenDisposition disposition) OVERRIDE;
141 142
142 // content::NotificationObserver overrides. 143 // content::NotificationObserver overrides.
143 virtual void Observe(int type, 144 virtual void Observe(int type,
144 const content::NotificationSource& source, 145 const content::NotificationSource& source,
145 const content::NotificationDetails& details) OVERRIDE; 146 const content::NotificationDetails& details) OVERRIDE;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Updates the maximum size of the panel so that it's never smaller than the 239 // Updates the maximum size of the panel so that it's never smaller than the
239 // panel's desired size. Note that even if the user resizes the panel smaller 240 // panel's desired size. Note that even if the user resizes the panel smaller
240 // later, the increased maximum size will still be in effect. Since it's not 241 // later, the increased maximum size will still be in effect. Since it's not
241 // possible currently to switch the panel back to autosizing from 242 // possible currently to switch the panel back to autosizing from
242 // user-resizable, it should not be a problem. 243 // user-resizable, it should not be a problem.
243 void IncreaseMaxSize(const gfx::Size& desired_panel_size); 244 void IncreaseMaxSize(const gfx::Size& desired_panel_size);
244 245
245 // Handles keyboard events coming back from the renderer. 246 // Handles keyboard events coming back from the renderer.
246 void HandleKeyboardEvent(const content::NativeWebKeyboardEvent& event); 247 void HandleKeyboardEvent(const content::NativeWebKeyboardEvent& event);
247 248
248 // Whether the panel window is always on top.
249 void SetAlwaysOnTop(bool on_top);
250
251 // Sets whether the panel is shown in preview mode. When the panel is 249 // Sets whether the panel is shown in preview mode. When the panel is
252 // being dragged, it is in preview mode. 250 // being dragged, it is in preview mode.
253 void SetPreviewMode(bool in_preview_mode); 251 void SetPreviewMode(bool in_preview_mode);
254 252
255 // Sets whether the minimize or restore button, if any, are visible. 253 // Sets whether the minimize or restore button, if any, are visible.
256 void UpdateMinimizeRestoreButtonVisibility(); 254 void UpdateMinimizeRestoreButtonVisibility();
257 255
258 // Changes the preferred size to acceptable based on min_size() and max_size() 256 // Changes the preferred size to acceptable based on min_size() and max_size()
259 gfx::Size ClampSize(const gfx::Size& size) const; 257 gfx::Size ClampSize(const gfx::Size& size) const;
260 258
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 394
397 // Icon showed in the task bar. 395 // Icon showed in the task bar.
398 gfx::Image app_icon_; 396 gfx::Image app_icon_;
399 397
400 base::WeakPtrFactory<Panel> image_loader_ptr_factory_; 398 base::WeakPtrFactory<Panel> image_loader_ptr_factory_;
401 399
402 DISALLOW_COPY_AND_ASSIGN(Panel); 400 DISALLOW_COPY_AND_ASSIGN(Panel);
403 }; 401 };
404 402
405 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ 403 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/panels/panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698