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_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
11 #include "content/public/browser/render_view_host.h" | 11 #include "content/public/browser/render_view_host.h" |
12 #include "content/public/browser/render_widget_host_view.h" | 12 #include "content/public/browser/render_widget_host_view.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "content/public/browser/web_contents_source.h" |
14 #include "ipc/ipc_message.h" | 15 #include "ipc/ipc_message.h" |
15 #include "ui/accessibility/ax_enums.h" | 16 #include "ui/accessibility/ax_enums.h" |
16 #include "ui/accessibility/ax_view_state.h" | 17 #include "ui/accessibility/ax_view_state.h" |
17 #include "ui/events/event.h" | 18 #include "ui/events/event.h" |
18 #include "ui/views/controls/native/native_view_host.h" | 19 #include "ui/views/controls/native/native_view_host.h" |
19 #include "ui/views/focus/focus_manager.h" | 20 #include "ui/views/focus/focus_manager.h" |
20 #include "ui/views/views_delegate.h" | 21 #include "ui/views/views_delegate.h" |
21 | 22 |
22 namespace views { | 23 namespace views { |
23 | 24 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 content::BrowserContext* browser_context) { | 384 content::BrowserContext* browser_context) { |
384 content::WebContents* contents = NULL; | 385 content::WebContents* contents = NULL; |
385 if (ViewsDelegate::GetInstance()) { | 386 if (ViewsDelegate::GetInstance()) { |
386 contents = | 387 contents = |
387 ViewsDelegate::GetInstance()->CreateWebContents(browser_context, NULL); | 388 ViewsDelegate::GetInstance()->CreateWebContents(browser_context, NULL); |
388 } | 389 } |
389 | 390 |
390 if (!contents) { | 391 if (!contents) { |
391 content::WebContents::CreateParams create_params( | 392 content::WebContents::CreateParams create_params( |
392 browser_context, NULL); | 393 browser_context, NULL); |
393 return content::WebContents::Create(create_params); | 394 content::WebContents* web_contents = |
| 395 content::WebContents::Create(create_params); |
| 396 WebContentsSource::CreateForWebContentsAndLocation(web_contents, FROM_HERE); |
| 397 return web_contents; |
394 } | 398 } |
395 | 399 |
396 return contents; | 400 return contents; |
397 } | 401 } |
398 | 402 |
399 } // namespace views | 403 } // namespace views |
OLD | NEW |