| 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 "ui/views/controls/webview/webview.h" | 5 #include "ui/views/controls/webview/webview.h" |
| 6 | 6 |
| 7 #include "content/public/browser/browser_accessibility_state.h" | 7 #include "content/public/browser/browser_accessibility_state.h" |
| 8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
| 9 #include "content/public/browser/navigation_controller.h" | 9 #include "content/public/browser/navigation_controller.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 content::BrowserContext* browser_context) { | 358 content::BrowserContext* browser_context) { |
| 359 content::WebContents* contents = NULL; | 359 content::WebContents* contents = NULL; |
| 360 if (ViewsDelegate::views_delegate) { | 360 if (ViewsDelegate::views_delegate) { |
| 361 contents = ViewsDelegate::views_delegate->CreateWebContents( | 361 contents = ViewsDelegate::views_delegate->CreateWebContents( |
| 362 browser_context, NULL); | 362 browser_context, NULL); |
| 363 } | 363 } |
| 364 | 364 |
| 365 if (!contents) { | 365 if (!contents) { |
| 366 content::WebContents::CreateParams create_params( | 366 content::WebContents::CreateParams create_params( |
| 367 browser_context, NULL); | 367 browser_context, NULL); |
| 368 create_params.context = GetWidget()->GetNativeView(); |
| 368 return content::WebContents::Create(create_params); | 369 return content::WebContents::Create(create_params); |
| 369 } | 370 } |
| 370 | 371 |
| 371 return contents; | 372 return contents; |
| 372 } | 373 } |
| 373 | 374 |
| 374 } // namespace views | 375 } // namespace views |
| OLD | NEW |