| 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/views/web_dialog_view.h" | 5 #include "chrome/browser/ui/views/web_dialog_view.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/property_bag.h" | 9 #include "base/property_bag.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #if defined(USE_AURA) | 26 #if defined(USE_AURA) |
| 27 #include "ui/aura/event.h" | 27 #include "ui/aura/event.h" |
| 28 #include "ui/views/widget/native_widget_aura.h" | 28 #include "ui/views/widget/native_widget_aura.h" |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 using content::NativeWebKeyboardEvent; | 31 using content::NativeWebKeyboardEvent; |
| 32 using content::WebContents; | 32 using content::WebContents; |
| 33 using content::WebUIMessageHandler; | 33 using content::WebUIMessageHandler; |
| 34 using ui::WebDialogDelegate; | 34 using ui::WebDialogDelegate; |
| 35 using ui::WebDialogUI; | 35 using ui::WebDialogUI; |
| 36 using ui::WebDialogWebContentsDelegate; |
| 36 | 37 |
| 37 //////////////////////////////////////////////////////////////////////////////// | 38 //////////////////////////////////////////////////////////////////////////////// |
| 38 // WebDialogView, public: | 39 // WebDialogView, public: |
| 39 | 40 |
| 40 WebDialogView::WebDialogView( | 41 WebDialogView::WebDialogView( |
| 41 content::BrowserContext* context, | 42 content::BrowserContext* context, |
| 42 WebDialogDelegate* delegate, | 43 WebDialogDelegate* delegate, |
| 43 WebContentsHandler* handler) | 44 WebContentsHandler* handler) |
| 44 : ClientView(NULL, NULL), | 45 : ClientView(NULL, NULL), |
| 45 WebDialogWebContentsDelegate(context, handler), | 46 WebDialogWebContentsDelegate(context, handler), |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 311 |
| 311 if (delegate_) { | 312 if (delegate_) { |
| 312 gfx::Size out; | 313 gfx::Size out; |
| 313 delegate_->GetDialogSize(&out); | 314 delegate_->GetDialogSize(&out); |
| 314 if (!out.IsEmpty() && GetWidget()) | 315 if (!out.IsEmpty() && GetWidget()) |
| 315 GetWidget()->CenterWindow(out); | 316 GetWidget()->CenterWindow(out); |
| 316 } | 317 } |
| 317 | 318 |
| 318 web_view_->LoadInitialURL(GetDialogContentURL()); | 319 web_view_->LoadInitialURL(GetDialogContentURL()); |
| 319 } | 320 } |
| OLD | NEW |