| OLD | NEW |
| 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 "content/browser/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 NotifyDisconnected(); | 227 NotifyDisconnected(); |
| 228 | 228 |
| 229 // Notify any observer that have a reference on this tab contents. | 229 // Notify any observer that have a reference on this tab contents. |
| 230 content::NotificationService::current()->Notify( | 230 content::NotificationService::current()->Notify( |
| 231 content::NOTIFICATION_TAB_CONTENTS_DESTROYED, | 231 content::NOTIFICATION_TAB_CONTENTS_DESTROYED, |
| 232 content::Source<TabContents>(this), | 232 content::Source<TabContents>(this), |
| 233 content::NotificationService::NoDetails()); | 233 content::NotificationService::NoDetails()); |
| 234 | 234 |
| 235 // TODO(brettw) this should be moved to the view. | 235 // TODO(brettw) this should be moved to the view. |
| 236 #if defined(OS_WIN) | 236 #if defined(OS_WIN) && !defined(USE_AURA) |
| 237 // If we still have a window handle, destroy it. GetNativeView can return | 237 // If we still have a window handle, destroy it. GetNativeView can return |
| 238 // NULL if this contents was part of a window that closed. | 238 // NULL if this contents was part of a window that closed. |
| 239 if (GetNativeView()) { | 239 if (GetNativeView()) { |
| 240 RenderViewHost* host = render_view_host(); | 240 RenderViewHost* host = render_view_host(); |
| 241 if (host && host->view()) | 241 if (host && host->view()) |
| 242 host->view()->WillWmDestroy(); | 242 host->view()->WillWmDestroy(); |
| 243 } | 243 } |
| 244 #endif | 244 #endif |
| 245 | 245 |
| 246 // OnCloseStarted isn't called in unit tests. | 246 // OnCloseStarted isn't called in unit tests. |
| (...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 | 2015 |
| 2016 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2016 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 2017 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2017 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
| 2018 rwh_view->SetSize(view()->GetContainerSize()); | 2018 rwh_view->SetSize(view()->GetContainerSize()); |
| 2019 } | 2019 } |
| 2020 | 2020 |
| 2021 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { | 2021 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { |
| 2022 return render_view_host() ? | 2022 return render_view_host() ? |
| 2023 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; | 2023 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; |
| 2024 } | 2024 } |
| OLD | NEW |