| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/gtk/constrained_window_gtk.h" | 7 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" |
| 8 #include "content/public/browser/notification_source.h" | 8 #include "content/public/browser/notification_source.h" |
| 9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 virtual WebContents* GetWebContents() OVERRIDE { | 77 virtual WebContents* GetWebContents() OVERRIDE { |
| 78 return impl_->GetWebContents(); | 78 return impl_->GetWebContents(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 // ConstrainedWindowGtkDelegate interface | 81 // ConstrainedWindowGtkDelegate interface |
| 82 virtual GtkWidget* GetWidgetRoot() OVERRIDE { | 82 virtual GtkWidget* GetWidgetRoot() OVERRIDE { |
| 83 return GetWebContents()->GetView()->GetNativeView(); | 83 return GetWebContents()->GetView()->GetNativeView(); |
| 84 } | 84 } |
| 85 virtual GtkWidget* GetFocusWidget() OVERRIDE { | 85 virtual GtkWidget* GetFocusWidget() OVERRIDE { |
| 86 return GetWebContents()->GetContentNativeView(); | 86 return GetWebContents()->GetView()->GetContentNativeView(); |
| 87 } | 87 } |
| 88 virtual void DeleteDelegate() OVERRIDE { | 88 virtual void DeleteDelegate() OVERRIDE { |
| 89 if (!impl_->closed_via_webui()) | 89 if (!impl_->closed_via_webui()) |
| 90 GetWebDialogDelegate()->OnDialogClosed(""); | 90 GetWebDialogDelegate()->OnDialogClosed(""); |
| 91 delete this; | 91 delete this; |
| 92 } | 92 } |
| 93 virtual bool GetBackgroundColor(GdkColor* color) OVERRIDE { | 93 virtual bool GetBackgroundColor(GdkColor* color) OVERRIDE { |
| 94 *color = ui::kGdkWhite; | 94 *color = ui::kGdkWhite; |
| 95 return true; | 95 return true; |
| 96 } | 96 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 WebDialogWebContentsDelegate* tab_delegate, | 132 WebDialogWebContentsDelegate* tab_delegate, |
| 133 content::WebContents* web_contents) { | 133 content::WebContents* web_contents) { |
| 134 ConstrainedWebDialogDelegateViewGtk* constrained_delegate = | 134 ConstrainedWebDialogDelegateViewGtk* constrained_delegate = |
| 135 new ConstrainedWebDialogDelegateViewGtk( | 135 new ConstrainedWebDialogDelegateViewGtk( |
| 136 browser_context, delegate, tab_delegate); | 136 browser_context, delegate, tab_delegate); |
| 137 ConstrainedWindowGtk* window = | 137 ConstrainedWindowGtk* window = |
| 138 new ConstrainedWindowGtk(web_contents, constrained_delegate); | 138 new ConstrainedWindowGtk(web_contents, constrained_delegate); |
| 139 constrained_delegate->SetWindow(window); | 139 constrained_delegate->SetWindow(window); |
| 140 return constrained_delegate; | 140 return constrained_delegate; |
| 141 } | 141 } |
| OLD | NEW |