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

Side by Side Diff: content/browser/renderer_host/gtk_window_utils.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 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
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 "content/browser/renderer_host/gtk_window_utils.h" 5 #include "content/browser/renderer_host/gtk_window_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include <gdk/gdkx.h> 9 #include <gdk/gdkx.h>
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // TODO(tony): We should move this code into WebScreenInfoFactory. 56 // TODO(tony): We should move this code into WebScreenInfoFactory.
57 int monitor_number = gdk_screen_get_monitor_at_window(screen, gdk_window); 57 int monitor_number = gdk_screen_get_monitor_at_window(screen, gdk_window);
58 GdkRectangle monitor_rect; 58 GdkRectangle monitor_rect;
59 gdk_screen_get_monitor_geometry(screen, monitor_number, &monitor_rect); 59 gdk_screen_get_monitor_geometry(screen, monitor_number, &monitor_rect);
60 results->rect = WebKit::WebRect(monitor_rect.x, monitor_rect.y, 60 results->rect = WebKit::WebRect(monitor_rect.x, monitor_rect.y,
61 monitor_rect.width, monitor_rect.height); 61 monitor_rect.width, monitor_rect.height);
62 62
63 gfx::Rect available_rect = results->rect; 63 gfx::Rect available_rect = results->rect;
64 gfx::Rect work_area = GetWorkArea(GDK_WINDOW_XID(gdk_window)); 64 gfx::Rect work_area = GetWorkArea(GDK_WINDOW_XID(gdk_window));
65 if (!work_area.IsEmpty()) 65 if (!work_area.IsEmpty())
66 available_rect = available_rect.Intersect(work_area); 66 available_rect.Intersect(work_area);
67 results->availableRect = available_rect; 67 results->availableRect = available_rect;
68 } 68 }
69 69
70 } // namespace content 70 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/backing_store_win.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698