| 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/html_dialog_view.h" | 5 #include "chrome/browser/ui/views/html_dialog_view.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 if (delegate_) | 203 if (delegate_) |
| 204 delegate_->OnCloseContents(source, out_close_dialog); | 204 delegate_->OnCloseContents(source, out_close_dialog); |
| 205 } | 205 } |
| 206 | 206 |
| 207 bool HtmlDialogView::ShouldShowDialogTitle() const { | 207 bool HtmlDialogView::ShouldShowDialogTitle() const { |
| 208 if (delegate_) | 208 if (delegate_) |
| 209 return delegate_->ShouldShowDialogTitle(); | 209 return delegate_->ShouldShowDialogTitle(); |
| 210 return true; | 210 return true; |
| 211 } | 211 } |
| 212 | 212 |
| 213 bool HtmlDialogView::HandleContextMenu(const ContextMenuParams& params) { | 213 bool HtmlDialogView::HandleContextMenu( |
| 214 const content::ContextMenuParams& params) { |
| 214 if (delegate_) | 215 if (delegate_) |
| 215 return delegate_->HandleContextMenu(params); | 216 return delegate_->HandleContextMenu(params); |
| 216 return HtmlDialogTabContentsDelegate::HandleContextMenu(params); | 217 return HtmlDialogTabContentsDelegate::HandleContextMenu(params); |
| 217 } | 218 } |
| 218 | 219 |
| 219 //////////////////////////////////////////////////////////////////////////////// | 220 //////////////////////////////////////////////////////////////////////////////// |
| 220 // content::WebContentsDelegate implementation: | 221 // content::WebContentsDelegate implementation: |
| 221 | 222 |
| 222 void HtmlDialogView::MoveContents(WebContents* source, const gfx::Rect& pos) { | 223 void HtmlDialogView::MoveContents(WebContents* source, const gfx::Rect& pos) { |
| 223 // The contained web page wishes to resize itself. We let it do this because | 224 // The contained web page wishes to resize itself. We let it do this because |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 } | 317 } |
| 317 | 318 |
| 318 void HtmlDialogView::OnTabMainFrameFirstRender() { | 319 void HtmlDialogView::OnTabMainFrameFirstRender() { |
| 319 #if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK) | 320 #if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK) |
| 320 if (initialized_) { | 321 if (initialized_) { |
| 321 views::NativeWidgetGtk::UpdateFreezeUpdatesProperty( | 322 views::NativeWidgetGtk::UpdateFreezeUpdatesProperty( |
| 322 GTK_WINDOW(GetWidget()->GetNativeView()), false); | 323 GTK_WINDOW(GetWidget()->GetNativeView()), false); |
| 323 } | 324 } |
| 324 #endif | 325 #endif |
| 325 } | 326 } |
| OLD | NEW |