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

Side by Side Diff: chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc

Issue 8893010: GTK: Speculative fix for crash in BalloonViewHost. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 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
« no previous file with comments | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/gtk/notifications/balloon_view_host_gtk.h" 5 #include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h"
6 6
7 #include "chrome/browser/notifications/balloon.h" 7 #include "chrome/browser/notifications/balloon.h"
8 #include "content/browser/renderer_host/render_view_host.h" 8 #include "content/browser/renderer_host/render_view_host.h"
9 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" 9 #include "content/browser/renderer_host/render_widget_host_view_gtk.h"
10 #include "content/browser/tab_contents/tab_contents.h" 10 #include "content/browser/tab_contents/tab_contents.h"
11 11
12 BalloonViewHost::BalloonViewHost(Balloon* balloon) 12 BalloonViewHost::BalloonViewHost(Balloon* balloon)
13 : BalloonHost(balloon) { 13 : BalloonHost(balloon) {
14 } 14 }
15 15
16 BalloonViewHost::~BalloonViewHost() { 16 BalloonViewHost::~BalloonViewHost() {
17 Shutdown(); 17 Shutdown();
18 } 18 }
19 19
20 void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) { 20 void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) {
21 tab_contents_->render_view_host()->view()->SetSize(new_size); 21 RenderViewHost* host = tab_contents_->render_view_host();
22 if (host) {
23 RenderWidgetHostView* view = host->view();
24 if (view)
25 view->SetSize(new_size);
26 }
27
22 gtk_widget_set_size_request( 28 gtk_widget_set_size_request(
23 native_view(), new_size.width(), new_size.height()); 29 native_view(), new_size.width(), new_size.height());
24 } 30 }
25 31
26 gfx::NativeView BalloonViewHost::native_view() const { 32 gfx::NativeView BalloonViewHost::native_view() const {
27 return tab_contents_->GetNativeView(); 33 return tab_contents_->GetNativeView();
28 } 34 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698