| 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 "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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 IPC_END_MESSAGE_MAP_EX() | 358 IPC_END_MESSAGE_MAP_EX() |
| 359 | 359 |
| 360 if (!message_is_ok) { | 360 if (!message_is_ok) { |
| 361 content::RecordAction(UserMetricsAction("BadMessageTerminate_RVD")); | 361 content::RecordAction(UserMetricsAction("BadMessageTerminate_RVD")); |
| 362 GetRenderProcessHost()->ReceivedBadMessage(); | 362 GetRenderProcessHost()->ReceivedBadMessage(); |
| 363 } | 363 } |
| 364 | 364 |
| 365 return handled; | 365 return handled; |
| 366 } | 366 } |
| 367 | 367 |
| 368 void TabContents::OpenColorChooser(RenderViewHost* render_view_host, |
| 369 const WebKit::WebColor& color) { |
| 370 delegate_->OpenColorChooser(this, color); |
| 371 } |
| 372 |
| 373 void TabContents::EndColorChooser(RenderViewHost* render_view_host) { |
| 374 delegate_->EndColorChooser(this); |
| 375 } |
| 376 |
| 377 void TabContents::SetSelectedColorInColorChooser( |
| 378 RenderViewHost* render_view_host, |
| 379 const WebKit::WebColor& color) { |
| 380 delegate_->SetSelectedColorInColorChooser(this, color); |
| 381 } |
| 382 |
| 368 void TabContents::RunFileChooser( | 383 void TabContents::RunFileChooser( |
| 369 RenderViewHost* render_view_host, | 384 RenderViewHost* render_view_host, |
| 370 const content::FileChooserParams& params) { | 385 const content::FileChooserParams& params) { |
| 371 delegate_->RunFileChooser(this, params); | 386 delegate_->RunFileChooser(this, params); |
| 372 } | 387 } |
| 373 | 388 |
| 374 NavigationController& TabContents::GetController() { | 389 NavigationController& TabContents::GetController() { |
| 375 return controller_; | 390 return controller_; |
| 376 } | 391 } |
| 377 | 392 |
| (...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2278 encoding_ = content::GetContentClient()->browser()-> | 2293 encoding_ = content::GetContentClient()->browser()-> |
| 2279 GetCanonicalEncodingNameByAliasName(encoding); | 2294 GetCanonicalEncodingNameByAliasName(encoding); |
| 2280 } | 2295 } |
| 2281 | 2296 |
| 2282 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2297 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 2283 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2298 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
| 2284 // Can be NULL during tests. | 2299 // Can be NULL during tests. |
| 2285 if (rwh_view) | 2300 if (rwh_view) |
| 2286 rwh_view->SetSize(GetView()->GetContainerSize()); | 2301 rwh_view->SetSize(GetView()->GetContainerSize()); |
| 2287 } | 2302 } |
| OLD | NEW |