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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 | 1371 |
1372 entry->set_title(final_title); | 1372 entry->set_title(final_title); |
1373 } else { | 1373 } else { |
1374 if (page_title_when_no_navigation_entry_ == final_title) | 1374 if (page_title_when_no_navigation_entry_ == final_title) |
1375 return false; // Nothing changed, don't bother. | 1375 return false; // Nothing changed, don't bother. |
1376 | 1376 |
1377 page_title_when_no_navigation_entry_ = final_title; | 1377 page_title_when_no_navigation_entry_ = final_title; |
1378 } | 1378 } |
1379 | 1379 |
1380 // Lastly, set the title for the view. | 1380 // Lastly, set the title for the view. |
1381 view_->SetPageTitle(UTF16ToWideHack(final_title)); | 1381 view_->SetPageTitle(final_title); |
1382 | 1382 |
1383 TitleUpdatedDetails details(entry, explicit_set); | 1383 TitleUpdatedDetails details(entry, explicit_set); |
1384 | 1384 |
1385 NotificationService::current()->Notify( | 1385 NotificationService::current()->Notify( |
1386 content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED, | 1386 content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED, |
1387 Source<TabContents>(this), | 1387 Source<TabContents>(this), |
1388 Details<TitleUpdatedDetails>(&details)); | 1388 Details<TitleUpdatedDetails>(&details)); |
1389 | 1389 |
1390 return true; | 1390 return true; |
1391 } | 1391 } |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2016 } | 2016 } |
2017 | 2017 |
2018 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 2018 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
2019 render_manager_.SwapInRenderViewHost(rvh); | 2019 render_manager_.SwapInRenderViewHost(rvh); |
2020 } | 2020 } |
2021 | 2021 |
2022 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2022 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2023 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2023 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
2024 rwh_view->SetSize(view()->GetContainerSize()); | 2024 rwh_view->SetSize(view()->GetContainerSize()); |
2025 } | 2025 } |
OLD | NEW |