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

Unified Diff: chrome/browser/tab_contents/tab_contents_view_gtk.cc

Issue 8625001: GTK: Part 1 of removing GtkWidget->window to close up GSEALs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Ignore chromeos Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/automation/ui_controls_gtk.cc ('k') | chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents_view_gtk.cc
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
index d4a13216e21bf862bba835d37fa888c9cb9f553b..d01cee4ac0b8d1e86a6a226a0ec44e1d2ce5685c 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
@@ -162,8 +162,9 @@ void TabContentsViewGtk::GetContainerBounds(gfx::Rect* out) const {
// animation.
int x = 0;
int y = 0;
- if (expanded_->window)
- gdk_window_get_origin(expanded_->window, &x, &y);
+ GdkWindow* expanded_window = gtk_widget_get_window(expanded_.get());
+ if (expanded_window)
+ gdk_window_get_origin(expanded_window, &x, &y);
out->SetRect(x + expanded_->allocation.x, y + expanded_->allocation.y,
requested_size_.width(), requested_size_.height());
}
@@ -172,8 +173,12 @@ void TabContentsViewGtk::SetPageTitle(const string16& title) {
// Set the window name to include the page title so it's easier to spot
// when debugging (e.g. via xwininfo -tree).
gfx::NativeView content_view = GetContentNativeView();
- if (content_view && content_view->window)
- gdk_window_set_title(content_view->window, UTF16ToUTF8(title).c_str());
+ if (content_view) {
+ GdkWindow* content_window = gtk_widget_get_window(content_view);
+ if (content_window) {
+ gdk_window_set_title(content_window, UTF16ToUTF8(title).c_str());
+ }
+ }
}
void TabContentsViewGtk::OnTabCrashed(base::TerminationStatus status,
@@ -234,12 +239,13 @@ void TabContentsViewGtk::CloseTabAfterEventTracking() {
}
void TabContentsViewGtk::GetViewBounds(gfx::Rect* out) const {
- if (!GetNativeView()->window) {
+ GdkWindow* window = gtk_widget_get_window(GetNativeView());
+ if (!window) {
out->SetRect(0, 0, requested_size_.width(), requested_size_.height());
return;
}
int x = 0, y = 0, w, h;
- gdk_window_get_geometry(GetNativeView()->window, &x, &y, &w, &h, NULL);
+ gdk_window_get_geometry(window, &x, &y, &w, &h, NULL);
out->SetRect(x, y, w, h);
}
« no previous file with comments | « chrome/browser/automation/ui_controls_gtk.cc ('k') | chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698