Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: ui/views/controls/webview/webview.cc

Issue 1432143002: Track where WebContents are created in order to better understand issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698