diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 04:12:18 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 04:12:18 +0000 |
commit | 0f2f4b60511540e292e085ba5e1985be6bf93908 (patch) | |
tree | 6d6bb042fe78bb23c4eca3cf4a4222a3dab38e74 /chrome/browser/views/importing_progress_view.cc | |
parent | aaeb9dc745d49afa66c1b613daa5a3123f309955 (diff) | |
download | chromium_src-0f2f4b60511540e292e085ba5e1985be6bf93908.zip chromium_src-0f2f4b60511540e292e085ba5e1985be6bf93908.tar.gz chromium_src-0f2f4b60511540e292e085ba5e1985be6bf93908.tar.bz2 |
Window Delegate Improvements:
- Windows now must have a Delegate. Just construct the default WindowDelegate
if
you don't want to have to write one in testing.
- Windows now obtain their contents view by asking the delegate via
WindowDelegate::GetContentsView.
- Contents views no longer need to manually store a pointer to the Window that
contains them, WindowDelegate does this automatically via its window()
accessor.
Reviewer notes:
- review window_delegate.h first, then
- window.h/cc
- custom frame window.h/cc
- constrained_window_impl.h/cc
- then everything else (just updating all call sites)
B=1280060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/importing_progress_view.cc')
-rw-r--r-- | chrome/browser/views/importing_progress_view.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/views/importing_progress_view.cc b/chrome/browser/views/importing_progress_view.cc index aa99455..60953b3 100644 --- a/chrome/browser/views/importing_progress_view.cc +++ b/chrome/browser/views/importing_progress_view.cc @@ -63,7 +63,6 @@ ImportingProgressView::ImportingProgressView(const std::wstring& source_name, l10n_util::GetString(IDS_IMPORT_PROGRESS_STATUS_HISTORY))), label_cookies_(new ChromeViews::Label( l10n_util::GetString(IDS_IMPORT_PROGRESS_STATUS_COOKIES))), - window_(NULL), parent_window_(parent_window), coordinator_(coordinator), import_observer_(observer), @@ -167,7 +166,7 @@ void ImportingProgressView::ImportEnded() { // In every case, we need to close the UI now. importing_ = false; coordinator_->SetObserver(NULL); - window_->Close(); + window()->Close(); if (import_observer_) import_observer_->ImportComplete(); } @@ -220,6 +219,10 @@ bool ImportingProgressView::Cancel() { return false; } +ChromeViews::View* ImportingProgressView::GetContentsView() { + return this; +} + //////////////////////////////////////////////////////////////////////////////// // ImportingProgressView, private: @@ -296,10 +299,8 @@ void StartImportingWithUI(HWND parent_window, DCHECK(items != 0); ImportingProgressView* v = new ImportingProgressView( source_profile.description, items, coordinator, observer, parent_window); - ChromeViews::Window* window = ChromeViews::Window::CreateChromeWindow( - parent_window, gfx::Rect(), v, v); - v->set_window(window); - window->Show(); + ChromeViews::Window::CreateChromeWindow(parent_window, gfx::Rect(), + v)->Show(); coordinator->StartImportSettings(source_profile, items, new ProfileWriter(target_profile), first_run); |