| 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 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 notify_disconnection_ = true; | 1566 notify_disconnection_ = true; |
| 1567 content::NotificationService::current()->Notify( | 1567 content::NotificationService::current()->Notify( |
| 1568 content::NOTIFICATION_WEB_CONTENTS_SWAPPED, | 1568 content::NOTIFICATION_WEB_CONTENTS_SWAPPED, |
| 1569 content::Source<WebContents>(this), | 1569 content::Source<WebContents>(this), |
| 1570 content::NotificationService::NoDetails()); | 1570 content::NotificationService::NoDetails()); |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 void TabContents::NotifyConnected() { | 1573 void TabContents::NotifyConnected() { |
| 1574 notify_disconnection_ = true; | 1574 notify_disconnection_ = true; |
| 1575 content::NotificationService::current()->Notify( | 1575 content::NotificationService::current()->Notify( |
| 1576 content::NOTIFICATION_TAB_CONTENTS_CONNECTED, | 1576 content::NOTIFICATION_WEB_CONTENTS_CONNECTED, |
| 1577 content::Source<TabContents>(this), | 1577 content::Source<WebContents>(this), |
| 1578 content::NotificationService::NoDetails()); | 1578 content::NotificationService::NoDetails()); |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 void TabContents::NotifyDisconnected() { | 1581 void TabContents::NotifyDisconnected() { |
| 1582 if (!notify_disconnection_) | 1582 if (!notify_disconnection_) |
| 1583 return; | 1583 return; |
| 1584 | 1584 |
| 1585 notify_disconnection_ = false; | 1585 notify_disconnection_ = false; |
| 1586 content::NotificationService::current()->Notify( | 1586 content::NotificationService::current()->Notify( |
| 1587 content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, | 1587 content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2230 encoding_ = content::GetContentClient()->browser()-> | 2230 encoding_ = content::GetContentClient()->browser()-> |
| 2231 GetCanonicalEncodingNameByAliasName(encoding); | 2231 GetCanonicalEncodingNameByAliasName(encoding); |
| 2232 } | 2232 } |
| 2233 | 2233 |
| 2234 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2234 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 2235 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2235 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
| 2236 // Can be NULL during tests. | 2236 // Can be NULL during tests. |
| 2237 if (rwh_view) | 2237 if (rwh_view) |
| 2238 rwh_view->SetSize(GetView()->GetContainerSize()); | 2238 rwh_view->SetSize(GetView()->GetContainerSize()); |
| 2239 } | 2239 } |
| OLD | NEW |