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 "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // ConstrainedWebDialogDelegate: | 168 // ConstrainedWebDialogDelegate: |
169 const ui::WebDialogDelegate* GetWebDialogDelegate() const override { | 169 const ui::WebDialogDelegate* GetWebDialogDelegate() const override { |
170 return impl_->GetWebDialogDelegate(); | 170 return impl_->GetWebDialogDelegate(); |
171 } | 171 } |
172 ui::WebDialogDelegate* GetWebDialogDelegate() override { | 172 ui::WebDialogDelegate* GetWebDialogDelegate() override { |
173 return impl_->GetWebDialogDelegate(); | 173 return impl_->GetWebDialogDelegate(); |
174 } | 174 } |
175 void OnDialogCloseFromWebUI() override { | 175 void OnDialogCloseFromWebUI() override { |
176 return impl_->OnDialogCloseFromWebUI(); | 176 return impl_->OnDialogCloseFromWebUI(); |
177 } | 177 } |
178 void ReleaseWebContentsOnDialogClose() override { | 178 std::unique_ptr<content::WebContents> ReleaseWebContents() override { |
179 return impl_->ReleaseWebContentsOnDialogClose(); | 179 return impl_->ReleaseWebContents(); |
180 } | 180 } |
181 gfx::NativeWindow GetNativeDialog() override { | 181 gfx::NativeWindow GetNativeDialog() override { |
182 return impl_->GetNativeDialog(); | 182 return impl_->GetNativeDialog(); |
183 } | 183 } |
184 content::WebContents* GetWebContents() override { | 184 content::WebContents* GetWebContents() override { |
185 return impl_->GetWebContents(); | 185 return impl_->GetWebContents(); |
186 } | 186 } |
187 | 187 |
188 // views::WidgetDelegate: | 188 // views::WidgetDelegate: |
189 views::View* GetInitiallyFocusedView() override { return this; } | 189 views::View* GetInitiallyFocusedView() override { return this; } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 min_size, max_size); | 300 min_size, max_size); |
301 | 301 |
302 // For embedded WebContents, use the embedder's WebContents for constrained | 302 // For embedded WebContents, use the embedder's WebContents for constrained |
303 // window. | 303 // window. |
304 content::WebContents* top_level_web_contents = | 304 content::WebContents* top_level_web_contents = |
305 constrained_window::GetTopLevelWebContents(web_contents); | 305 constrained_window::GetTopLevelWebContents(web_contents); |
306 DCHECK(top_level_web_contents); | 306 DCHECK(top_level_web_contents); |
307 constrained_window::CreateWebModalDialogViews(dialog, top_level_web_contents); | 307 constrained_window::CreateWebModalDialogViews(dialog, top_level_web_contents); |
308 return dialog; | 308 return dialog; |
309 } | 309 } |
OLD | NEW |