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

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

Issue 12334073: Remove WebContents methods that duplicate WebContentsView methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/gtk/gtk_window_util.cc ('k') | chrome/browser/ui/gtk/panels/panel_gtk.cc » ('j') | 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) 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 "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 <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/notifications/balloon.h" 9 #include "chrome/browser/notifications/balloon.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
11 #include "content/public/browser/render_widget_host_view.h" 11 #include "content/public/browser/render_widget_host_view.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "content/public/browser/web_contents_view.h"
13 14
14 BalloonViewHost::BalloonViewHost(Balloon* balloon) 15 BalloonViewHost::BalloonViewHost(Balloon* balloon)
15 : BalloonHost(balloon) { 16 : BalloonHost(balloon) {
16 } 17 }
17 18
18 BalloonViewHost::~BalloonViewHost() { 19 BalloonViewHost::~BalloonViewHost() {
19 Shutdown(); 20 Shutdown();
20 } 21 }
21 22
22 void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) { 23 void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) {
23 content::RenderViewHost* host = web_contents_->GetRenderViewHost(); 24 content::RenderViewHost* host = web_contents_->GetRenderViewHost();
24 if (host) { 25 if (host) {
25 content::RenderWidgetHostView* view = host->GetView(); 26 content::RenderWidgetHostView* view = host->GetView();
26 if (view) 27 if (view)
27 view->SetSize(new_size); 28 view->SetSize(new_size);
28 } 29 }
29 30
30 gtk_widget_set_size_request( 31 gtk_widget_set_size_request(
31 native_view(), new_size.width(), new_size.height()); 32 native_view(), new_size.width(), new_size.height());
32 } 33 }
33 34
34 gfx::NativeView BalloonViewHost::native_view() const { 35 gfx::NativeView BalloonViewHost::native_view() const {
35 return web_contents_->GetNativeView(); 36 return web_contents_->GetView()->GetNativeView();
36 } 37 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_window_util.cc ('k') | chrome/browser/ui/gtk/panels/panel_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698