Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: chrome/browser/ui/views/importer/import_progress_dialog_view.cc

Issue 11571023: Move ash/wm's DialogFrameView to ui/views/window; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reorder DialogDelegate functions; inline Get*Params into WidgetExample::ButtonPressed; etc. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/importer/import_progress_dialog_view.h" 5 #include "chrome/browser/ui/views/importer/import_progress_dialog_view.h"
6 6
7 #include "chrome/browser/importer/importer_host.h" 7 #include "chrome/browser/importer/importer_host.h"
8 #include "chrome/browser/importer/importer_observer.h" 8 #include "chrome/browser/importer/importer_observer.h"
9 #include "chrome/browser/importer/importer_progress_dialog.h" 9 #include "chrome/browser/importer/importer_progress_dialog.h"
10 #include "grit/chromium_strings.h" 10 #include "grit/chromium_strings.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // another call to this function and at that point we must return true to 128 // another call to this function and at that point we must return true to
129 // allow the window to close. 129 // allow the window to close.
130 if (!importing_) 130 if (!importing_)
131 return true; // We have received ImportEnded, so we can close. 131 return true; // We have received ImportEnded, so we can close.
132 132
133 // Cancel the import and wait for further instructions. 133 // Cancel the import and wait for further instructions.
134 importer_host_->Cancel(); 134 importer_host_->Cancel();
135 return false; 135 return false;
136 } 136 }
137 137
138 views::View* ImportProgressDialogView::GetContentsView() {
139 return this;
140 }
141
142 void ImportProgressDialogView::InitControlLayout() { 138 void ImportProgressDialogView::InitControlLayout() {
143 using views::GridLayout; 139 using views::GridLayout;
144 using views::ColumnSet; 140 using views::ColumnSet;
145 141
146 GridLayout* layout = GridLayout::CreatePanel(this); 142 GridLayout* layout = GridLayout::CreatePanel(this);
147 SetLayoutManager(layout); 143 SetLayoutManager(layout);
148 144
149 gfx::Size ps = state_history_->GetPreferredSize(); 145 gfx::Size ps = state_history_->GetPreferredSize();
150 146
151 const int single_column_view_set_id = 0; 147 const int single_column_view_set_id = 0;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 views::Widget* window = views::Widget::CreateWindow(progress_view); 287 views::Widget* window = views::Widget::CreateWindow(progress_view);
292 288
293 if (!importer_host->is_headless() && !first_run) 289 if (!importer_host->is_headless() && !first_run)
294 window->Show(); 290 window->Show();
295 291
296 importer_host->StartImportSettings(source_profile, target_profile, items, 292 importer_host->StartImportSettings(source_profile, target_profile, items,
297 new ProfileWriter(target_profile), first_run); 293 new ProfileWriter(target_profile), first_run);
298 } 294 }
299 295
300 } // namespace importer 296 } // namespace importer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698