| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 73 } |
| 74 | 74 |
| 75 void WebView::SetEmbedFullscreenWidgetMode(bool enable) { | 75 void WebView::SetEmbedFullscreenWidgetMode(bool enable) { |
| 76 DCHECK(!web_contents()) | 76 DCHECK(!web_contents()) |
| 77 << "Cannot change mode while a WebContents is attached."; | 77 << "Cannot change mode while a WebContents is attached."; |
| 78 embed_fullscreen_widget_mode_enabled_ = enable; | 78 embed_fullscreen_widget_mode_enabled_ = enable; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void WebView::LoadInitialURL(const GURL& url) { | 81 void WebView::LoadInitialURL(const GURL& url) { |
| 82 GetWebContents()->GetController().LoadURL( | 82 GetWebContents()->GetController().LoadURL( |
| 83 url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 83 url, content::Referrer(), ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 84 std::string()); | 84 std::string()); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void WebView::SetFastResize(bool fast_resize) { | 87 void WebView::SetFastResize(bool fast_resize) { |
| 88 holder_->set_fast_resize(fast_resize); | 88 holder_->set_fast_resize(fast_resize); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void WebView::OnWebContentsFocused(content::WebContents* web_contents) { | 91 void WebView::OnWebContentsFocused(content::WebContents* web_contents) { |
| 92 FocusManager* focus_manager = GetFocusManager(); | 92 FocusManager* focus_manager = GetFocusManager(); |
| 93 if (focus_manager) | 93 if (focus_manager) |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 if (!contents) { | 377 if (!contents) { |
| 378 content::WebContents::CreateParams create_params( | 378 content::WebContents::CreateParams create_params( |
| 379 browser_context, NULL); | 379 browser_context, NULL); |
| 380 return content::WebContents::Create(create_params); | 380 return content::WebContents::Create(create_params); |
| 381 } | 381 } |
| 382 | 382 |
| 383 return contents; | 383 return contents; |
| 384 } | 384 } |
| 385 | 385 |
| 386 } // namespace views | 386 } // namespace views |
| OLD | NEW |