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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_gtk.cc

Issue 466016: linux: use TabContents to launch url for link in crash page... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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/gtk/sad_tab_gtk.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/tab_contents/tab_contents_view_gtk.h" 5 #include "chrome/browser/tab_contents/tab_contents_view_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 void TabContentsViewGtk::SetPageTitle(const std::wstring& title) { 254 void TabContentsViewGtk::SetPageTitle(const std::wstring& title) {
255 // Set the window name to include the page title so it's easier to spot 255 // Set the window name to include the page title so it's easier to spot
256 // when debugging (e.g. via xwininfo -tree). 256 // when debugging (e.g. via xwininfo -tree).
257 gfx::NativeView content_view = GetContentNativeView(); 257 gfx::NativeView content_view = GetContentNativeView();
258 if (content_view && content_view->window) 258 if (content_view && content_view->window)
259 gdk_window_set_title(content_view->window, WideToUTF8(title).c_str()); 259 gdk_window_set_title(content_view->window, WideToUTF8(title).c_str());
260 } 260 }
261 261
262 void TabContentsViewGtk::OnTabCrashed() { 262 void TabContentsViewGtk::OnTabCrashed() {
263 if (!sad_tab_.get()) { 263 if (tab_contents() != NULL && !sad_tab_.get()) {
264 sad_tab_.reset(new SadTabGtk); 264 sad_tab_.reset(new SadTabGtk(tab_contents()));
265 InsertIntoContentArea(sad_tab_->widget()); 265 InsertIntoContentArea(sad_tab_->widget());
266 gtk_widget_show(sad_tab_->widget()); 266 gtk_widget_show(sad_tab_->widget());
267 } 267 }
268 } 268 }
269 269
270 void TabContentsViewGtk::SizeContents(const gfx::Size& size) { 270 void TabContentsViewGtk::SizeContents(const gfx::Size& size) {
271 // We don't need to manually set the size of of widgets in GTK+, but we do 271 // We don't need to manually set the size of of widgets in GTK+, but we do
272 // need to pass the sizing information on to the RWHV which will pass the 272 // need to pass the sizing information on to the RWHV which will pass the
273 // sizing information on to the renderer. 273 // sizing information on to the renderer.
274 requested_size_ = size; 274 requested_size_ = size;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 477 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
478 widget, "x", &value); 478 widget, "x", &value);
479 479
480 int child_y = std::max(half_view_height - (requisition.height / 2), 0); 480 int child_y = std::max(half_view_height - (requisition.height / 2), 0);
481 g_value_set_int(&value, child_y); 481 g_value_set_int(&value, child_y);
482 gtk_container_child_set_property(GTK_CONTAINER(floating_container), 482 gtk_container_child_set_property(GTK_CONTAINER(floating_container),
483 widget, "y", &value); 483 widget, "y", &value);
484 g_value_unset(&value); 484 g_value_unset(&value);
485 } 485 }
486 } 486 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/sad_tab_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698