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 "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" | 5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/renderer_preferences_util.h" | 10 #include "chrome/browser/renderer_preferences_util.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 renderer_preferences_util::UpdateFromSystemSettings( | 41 renderer_preferences_util::UpdateFromSystemSettings( |
42 web_contents_->GetMutableRendererPrefs(), | 42 web_contents_->GetMutableRendererPrefs(), |
43 Profile::FromBrowserContext(browser_context)); | 43 Profile::FromBrowserContext(browser_context)); |
44 web_contents_->GetRenderViewHost()->SyncRendererPrefs(); | 44 web_contents_->GetRenderViewHost()->SyncRendererPrefs(); |
45 | 45 |
46 // Set |this| as a delegate so the ConstrainedWebDialogUI can retrieve it. | 46 // Set |this| as a delegate so the ConstrainedWebDialogUI can retrieve it. |
47 ConstrainedWebDialogUI::SetConstrainedDelegate(web_contents_.get(), this); | 47 ConstrainedWebDialogUI::SetConstrainedDelegate(web_contents_.get(), this); |
48 | 48 |
49 web_contents_->GetController().LoadURL(delegate->GetDialogContentURL(), | 49 web_contents_->GetController().LoadURL(delegate->GetDialogContentURL(), |
50 content::Referrer(), | 50 content::Referrer(), |
51 content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 51 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
52 std::string()); | 52 std::string()); |
53 } | 53 } |
54 | 54 |
55 ConstrainedWebDialogDelegateBase::~ConstrainedWebDialogDelegateBase() { | 55 ConstrainedWebDialogDelegateBase::~ConstrainedWebDialogDelegateBase() { |
56 if (release_contents_on_close_) | 56 if (release_contents_on_close_) |
57 ignore_result(web_contents_.release()); | 57 ignore_result(web_contents_.release()); |
58 } | 58 } |
59 | 59 |
60 const WebDialogDelegate* | 60 const WebDialogDelegate* |
61 ConstrainedWebDialogDelegateBase::GetWebDialogDelegate() const { | 61 ConstrainedWebDialogDelegateBase::GetWebDialogDelegate() const { |
(...skipping 25 matching lines...) Expand all Loading... |
87 } | 87 } |
88 | 88 |
89 WebContents* ConstrainedWebDialogDelegateBase::GetWebContents() { | 89 WebContents* ConstrainedWebDialogDelegateBase::GetWebContents() { |
90 return web_contents_.get(); | 90 return web_contents_.get(); |
91 } | 91 } |
92 | 92 |
93 void ConstrainedWebDialogDelegateBase::HandleKeyboardEvent( | 93 void ConstrainedWebDialogDelegateBase::HandleKeyboardEvent( |
94 content::WebContents* source, | 94 content::WebContents* source, |
95 const NativeWebKeyboardEvent& event) { | 95 const NativeWebKeyboardEvent& event) { |
96 } | 96 } |
OLD | NEW |