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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/public/browser/browser_accessibility_state.h" | 10 #include "content/public/browser/browser_accessibility_state.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 WebContentsObserver::Observe(replacement); | 60 WebContentsObserver::Observe(replacement); |
61 if (observing_render_process_host_) { | 61 if (observing_render_process_host_) { |
62 observing_render_process_host_->RemoveObserver(this); | 62 observing_render_process_host_->RemoveObserver(this); |
63 observing_render_process_host_ = nullptr; | 63 observing_render_process_host_ = nullptr; |
64 } | 64 } |
65 if (web_contents() && web_contents()->GetRenderProcessHost()) { | 65 if (web_contents() && web_contents()->GetRenderProcessHost()) { |
66 observing_render_process_host_ = web_contents()->GetRenderProcessHost(); | 66 observing_render_process_host_ = web_contents()->GetRenderProcessHost(); |
67 observing_render_process_host_->AddObserver(this); | 67 observing_render_process_host_->AddObserver(this); |
68 } | 68 } |
69 // web_contents() now returns |replacement| from here onwards. | 69 // web_contents() now returns |replacement| from here onwards. |
70 SetFocusable(!!web_contents()); | 70 SetFocusBehavior(web_contents() ? FocusBehavior::CONTROL |
karandeepb
2016/03/17 07:24:47
I am not sure what's the correct value here - CONT
| |
71 : FocusBehavior::NEVER); | |
71 if (wc_owner_.get() != replacement) | 72 if (wc_owner_.get() != replacement) |
72 wc_owner_.reset(); | 73 wc_owner_.reset(); |
73 if (embed_fullscreen_widget_mode_enabled_) { | 74 if (embed_fullscreen_widget_mode_enabled_) { |
74 is_embedding_fullscreen_widget_ = | 75 is_embedding_fullscreen_widget_ = |
75 web_contents() && web_contents()->GetFullscreenRenderWidgetHostView(); | 76 web_contents() && web_contents()->GetFullscreenRenderWidgetHostView(); |
76 } else { | 77 } else { |
77 DCHECK(!is_embedding_fullscreen_widget_); | 78 DCHECK(!is_embedding_fullscreen_widget_); |
78 } | 79 } |
79 AttachWebContents(); | 80 AttachWebContents(); |
80 NotifyAccessibilityWebContentsChanged(); | 81 NotifyAccessibilityWebContentsChanged(); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
394 if (!contents) { | 395 if (!contents) { |
395 content::WebContents::CreateParams create_params( | 396 content::WebContents::CreateParams create_params( |
396 browser_context, NULL); | 397 browser_context, NULL); |
397 return content::WebContents::Create(create_params); | 398 return content::WebContents::Create(create_params); |
398 } | 399 } |
399 | 400 |
400 return contents; | 401 return contents; |
401 } | 402 } |
402 | 403 |
403 } // namespace views | 404 } // namespace views |
OLD | NEW |