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

Side by Side Diff: chrome/browser/ui/gtk/gtk_window_util.h

Issue 10871087: GTK implementation of remembering platform app window geometry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 #ifndef CHROME_BROWSER_UI_GTK_GTK_WINDOW_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_WINDOW_UTIL_H_
6 #define CHROME_BROWSER_UI_GTK_GTK_WINDOW_UTIL_H_ 6 #define CHROME_BROWSER_UI_GTK_GTK_WINDOW_UTIL_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 10
11 class BaseWindow;
12
11 namespace content { 13 namespace content {
12 class WebContents; 14 class WebContents;
13 } 15 }
14 16
15 namespace gtk_window_util { 17 namespace gtk_window_util {
16 18
17 // Performs Cut/Copy/Paste operation on the |window|'s |web_contents|. 19 // Performs Cut/Copy/Paste operation on the |window|'s |web_contents|.
18 void DoCut(GtkWindow* window, content::WebContents* web_contents); 20 void DoCut(GtkWindow* window, content::WebContents* web_contents);
19 void DoCopy(GtkWindow* window, content::WebContents* web_contents); 21 void DoCopy(GtkWindow* window, content::WebContents* web_contents);
20 void DoPaste(GtkWindow* window, content::WebContents* web_contents); 22 void DoPaste(GtkWindow* window, content::WebContents* web_contents);
(...skipping 21 matching lines...) Expand all
42 44
43 // Set a custom WM_CLASS for a window. 45 // Set a custom WM_CLASS for a window.
44 void SetWindowCustomClass(GtkWindow* window, const std::string& wmclass); 46 void SetWindowCustomClass(GtkWindow* window, const std::string& wmclass);
45 47
46 // A helper method for setting the GtkWindow size that should be used in place 48 // A helper method for setting the GtkWindow size that should be used in place
47 // of calling gtk_window_resize directly. This is done to avoid a WM "feature" 49 // of calling gtk_window_resize directly. This is done to avoid a WM "feature"
48 // where setting the window size to the monitor size causes the WM to set the 50 // where setting the window size to the monitor size causes the WM to set the
49 // EWMH for full screen mode. 51 // EWMH for full screen mode.
50 void SetWindowSize(GtkWindow* window, const gfx::Size& size); 52 void SetWindowSize(GtkWindow* window, const gfx::Size& size);
51 53
54 // Update the origin of |bounds| and |restored_bounds| with values gotten
55 // from GTK.
56 void UpdateWindowPosition(BaseWindow* window,
57 gfx::Rect* bounds,
58 gfx::Rect* restored_bounds);
59
52 } // namespace gtk_window_util 60 } // namespace gtk_window_util
53 61
54 #endif // CHROME_BROWSER_UI_GTK_GTK_WINDOW_UTIL_H_ 62 #endif // CHROME_BROWSER_UI_GTK_GTK_WINDOW_UTIL_H_
55 63
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/extensions/shell_window_gtk.cc ('k') | chrome/browser/ui/gtk/gtk_window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698