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" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 if (observing_render_process_host_) { | 58 if (observing_render_process_host_) { |
59 observing_render_process_host_->RemoveObserver(this); | 59 observing_render_process_host_->RemoveObserver(this); |
60 observing_render_process_host_ = nullptr; | 60 observing_render_process_host_ = nullptr; |
61 } | 61 } |
62 if (web_contents() && web_contents()->GetRenderProcessHost()) { | 62 if (web_contents() && web_contents()->GetRenderProcessHost()) { |
63 observing_render_process_host_ = web_contents()->GetRenderProcessHost(); | 63 observing_render_process_host_ = web_contents()->GetRenderProcessHost(); |
64 observing_render_process_host_->AddObserver(this); | 64 observing_render_process_host_->AddObserver(this); |
65 } | 65 } |
66 // web_contents() now returns |replacement| from here onwards. | 66 // web_contents() now returns |replacement| from here onwards. |
67 SetFocusable(!!web_contents()); | 67 SetFocusable(!!web_contents()); |
68 if (wc_owner_ != replacement) | 68 if (wc_owner_.get() != replacement) |
69 wc_owner_.reset(); | 69 wc_owner_.reset(); |
70 if (embed_fullscreen_widget_mode_enabled_) { | 70 if (embed_fullscreen_widget_mode_enabled_) { |
71 is_embedding_fullscreen_widget_ = | 71 is_embedding_fullscreen_widget_ = |
72 web_contents() && web_contents()->GetFullscreenRenderWidgetHostView(); | 72 web_contents() && web_contents()->GetFullscreenRenderWidgetHostView(); |
73 } else { | 73 } else { |
74 DCHECK(!is_embedding_fullscreen_widget_); | 74 DCHECK(!is_embedding_fullscreen_widget_); |
75 } | 75 } |
76 AttachWebContents(); | 76 AttachWebContents(); |
77 NotifyAccessibilityWebContentsChanged(); | 77 NotifyAccessibilityWebContentsChanged(); |
78 } | 78 } |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 if (!contents) { | 390 if (!contents) { |
391 content::WebContents::CreateParams create_params( | 391 content::WebContents::CreateParams create_params( |
392 browser_context, NULL); | 392 browser_context, NULL); |
393 return content::WebContents::Create(create_params); | 393 return content::WebContents::Create(create_params); |
394 } | 394 } |
395 | 395 |
396 return contents; | 396 return contents; |
397 } | 397 } |
398 | 398 |
399 } // namespace views | 399 } // namespace views |
OLD | NEW |