| 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_context.h" | 7 #include "content/public/browser/browser_context.h" |
| 8 #include "content/public/browser/navigation_controller.h" | 8 #include "content/public/browser/navigation_controller.h" |
| 9 #include "content/public/browser/notification_details.h" | 9 #include "content/public/browser/notification_details.h" |
| 10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 if (web_contents == web_contents_) | 59 if (web_contents == web_contents_) |
| 60 return; | 60 return; |
| 61 DetachWebContents(); | 61 DetachWebContents(); |
| 62 wc_owner_.reset(); | 62 wc_owner_.reset(); |
| 63 web_contents_ = web_contents; | 63 web_contents_ = web_contents; |
| 64 AttachWebContents(); | 64 AttachWebContents(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void WebView::LoadInitialURL(const GURL& url) { | 67 void WebView::LoadInitialURL(const GURL& url) { |
| 68 GetWebContents()->GetController().LoadURL( | 68 GetWebContents()->GetController().LoadURL( |
| 69 url, content::Referrer(), content::PAGE_TRANSITION_START_PAGE, | 69 url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 70 std::string()); | 70 std::string()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void WebView::SetFastResize(bool fast_resize) { | 73 void WebView::SetFastResize(bool fast_resize) { |
| 74 wcv_holder_->set_fast_resize(fast_resize); | 74 wcv_holder_->set_fast_resize(fast_resize); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void WebView::OnWebContentsFocused(content::WebContents* web_contents) { | 77 void WebView::OnWebContentsFocused(content::WebContents* web_contents) { |
| 78 FocusManager* focus_manager = GetFocusManager(); | 78 FocusManager* focus_manager = GetFocusManager(); |
| 79 if (focus_manager) | 79 if (focus_manager) |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 return content::WebContents::Create(browser_context, | 253 return content::WebContents::Create(browser_context, |
| 254 site_instance, | 254 site_instance, |
| 255 MSG_ROUTING_NONE, | 255 MSG_ROUTING_NONE, |
| 256 NULL); | 256 NULL); |
| 257 } | 257 } |
| 258 | 258 |
| 259 return contents; | 259 return contents; |
| 260 } | 260 } |
| 261 | 261 |
| 262 } // namespace views | 262 } // namespace views |
| OLD | NEW |