diff options
4 files changed, 25 insertions, 23 deletions
diff --git a/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm b/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm index a13cf7e..f53b193 100644 --- a/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm +++ b/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -31,6 +31,10 @@ class ConstrainedHtmlDelegateMac : ignore_result(tab_.release()); } + void set_window(ConstrainedWindow* window) { + constrained_window_ = window; + } + // ConstrainedWindowMacDelegateCustomSheet ----------------------------------- virtual void DeleteDelegate() OVERRIDE { // From ConstrainedWindowMacDelegate: "you MUST close the sheet belonging to @@ -54,10 +58,6 @@ class ConstrainedHtmlDelegateMac : virtual void HandleKeyboardEvent( const NativeWebKeyboardEvent& event) OVERRIDE {} - void set_window(ConstrainedWindow* window) { - constrained_window_ = window; - } - private: // Holds the HTML to be displayed in the sheet. scoped_ptr<TabContentsWrapper> tab_; diff --git a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc index b825cb6..e77cceb 100644 --- a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc +++ b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -15,7 +15,7 @@ #include "content/public/browser/notification_source.h" #include "content/public/browser/web_contents.h" #include "ui/base/gtk/gtk_hig_constants.h" -#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" using content::WebContents; @@ -31,6 +31,10 @@ class ConstrainedHtmlDelegateGtk : public ConstrainedWindowGtkDelegate, ignore_result(tab_.release()); } + void set_window(ConstrainedWindow* window) { + window_ = window; + } + // ConstrainedWindowGtkDelegate ---------------------------------------------- virtual GtkWidget* GetWidgetRoot() OVERRIDE { return tab_contents_container_.widget(); @@ -71,10 +75,6 @@ class ConstrainedHtmlDelegateGtk : public ConstrainedWindowGtkDelegate, const NativeWebKeyboardEvent& event) OVERRIDE { } - void set_window(ConstrainedWindow* window) { - window_ = window; - } - private: scoped_ptr<TabContentsWrapper> tab_; TabContentsContainerGtk tab_contents_container_; diff --git a/chrome/browser/ui/views/constrained_html_delegate_gtk.cc b/chrome/browser/ui/views/constrained_html_delegate_gtk.cc index 97d49fe..05235d3 100644 --- a/chrome/browser/ui/views/constrained_html_delegate_gtk.cc +++ b/chrome/browser/ui/views/constrained_html_delegate_gtk.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -13,7 +13,7 @@ #include "chrome/browser/ui/webui/html_dialog_ui.h" #include "content/public/browser/web_contents.h" #include "ui/base/gtk/gtk_hig_constants.h" -#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" #include "ui/views/widget/native_widget_gtk.h" using content::WebContents; @@ -29,6 +29,10 @@ class ConstrainedHtmlDelegateGtk : public views::NativeWidgetGtk, HtmlDialogUIDelegate* delegate); ~ConstrainedHtmlDelegateGtk(); + void set_window(ConstrainedWindow* window) { + window_ = window; + } + // ConstrainedHtmlUIDelegate interface. virtual HtmlDialogUIDelegate* GetHtmlDialogUIDelegate() OVERRIDE; virtual void OnDialogCloseFromWebUI() OVERRIDE; @@ -66,10 +70,6 @@ class ConstrainedHtmlDelegateGtk : public views::NativeWidgetGtk, // HtmlDialogTabContentsDelegate interface. void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) OVERRIDE {} - void set_window(ConstrainedWindow* window) { - window_ = window; - } - private: scoped_ptr<TabContentsWrapper> html_tab_contents_; TabContentsContainer* tab_container_; diff --git a/chrome/browser/ui/views/constrained_html_delegate_views.cc b/chrome/browser/ui/views/constrained_html_delegate_views.cc index f9d90cc..3930212 100644 --- a/chrome/browser/ui/views/constrained_html_delegate_views.cc +++ b/chrome/browser/ui/views/constrained_html_delegate_views.cc @@ -1,9 +1,10 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/constrained_html_ui.h" +#include "base/property_bag.h" #include "base/utf_string_conversions.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" @@ -12,7 +13,7 @@ #include "chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h" #include "chrome/browser/ui/webui/html_dialog_ui.h" #include "content/public/browser/web_contents.h" -#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" #include "ui/views/view.h" #include "ui/views/widget/widget_delegate.h" @@ -27,6 +28,10 @@ class ConstrainedHtmlDelegateViews : public TabContentsContainer, HtmlDialogUIDelegate* delegate); ~ConstrainedHtmlDelegateViews(); + void set_window(ConstrainedWindow* window) { + window_ = window; + } + // ConstrainedHtmlUIDelegate interface. virtual HtmlDialogUIDelegate* GetHtmlDialogUIDelegate() OVERRIDE; virtual void OnDialogCloseFromWebUI() OVERRIDE; @@ -71,6 +76,7 @@ class ConstrainedHtmlDelegateViews : public TabContentsContainer, return size; } + // views::WidgetDelegate interface. virtual void ViewHierarchyChanged(bool is_add, views::View* parent, views::View* child) OVERRIDE { @@ -80,10 +86,6 @@ class ConstrainedHtmlDelegateViews : public TabContentsContainer, } } - void set_window(ConstrainedWindow* window) { - window_ = window; - } - private: scoped_ptr<TabContentsWrapper> html_tab_contents_; |