| OLD | NEW |
| 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/views/notifications/balloon_view_host.h" | 5 #include "chrome/browser/ui/views/notifications/balloon_view_host.h" |
| 6 | 6 |
| 7 #include "chrome/browser/notifications/balloon.h" | 7 #include "chrome/browser/notifications/balloon.h" |
| 8 #include "content/public/browser/content_browser_client.h" | 8 #include "content/public/browser/content_browser_client.h" |
| 9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
| 10 #include "content/public/browser/render_widget_host_view.h" | 10 #include "content/public/browser/render_widget_host_view.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 bool initialized_; | 35 bool initialized_; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 BalloonViewHost::BalloonViewHost(Balloon* balloon) | 38 BalloonViewHost::BalloonViewHost(Balloon* balloon) |
| 39 : BalloonHost(balloon) { | 39 : BalloonHost(balloon) { |
| 40 native_host_ = new BalloonViewHostView(this); | 40 native_host_ = new BalloonViewHostView(this); |
| 41 } | 41 } |
| 42 | 42 |
| 43 BalloonViewHost::~BalloonViewHost() { | 43 BalloonViewHost::~BalloonViewHost() { |
| 44 Shutdown(); | 44 Shutdown(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void BalloonViewHost::Init(gfx::NativeView parent_native_view) { | 47 void BalloonViewHost::Init(gfx::NativeView parent_native_view) { |
| 48 parent_native_view_ = parent_native_view; | 48 parent_native_view_ = parent_native_view; |
| 49 BalloonHost::Init(); | 49 BalloonHost::Init(); |
| 50 | 50 |
| 51 content::RenderWidgetHostView* render_widget_host_view = | 51 content::RenderWidgetHostView* render_widget_host_view = |
| 52 web_contents_->GetRenderViewHost()->GetView(); | 52 web_contents_->GetRenderViewHost()->GetView(); |
| 53 | 53 |
| 54 native_host_->Attach(render_widget_host_view->GetNativeView()); | 54 native_host_->Attach(render_widget_host_view->GetNativeView()); |
| 55 } | 55 } |
| OLD | NEW |