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

Side by Side Diff: chrome/browser/ui/webui/options2/import_data_handler2.h

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename Initialize -> InitializeHandler, SendPageValues -> InitializePage Created 8 years, 9 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 12 matching lines...) Expand all
23 class ImportDataHandler : public OptionsPageUIHandler, 23 class ImportDataHandler : public OptionsPageUIHandler,
24 public importer::ImporterListObserver, 24 public importer::ImporterListObserver,
25 public importer::ImporterProgressObserver { 25 public importer::ImporterProgressObserver {
26 public: 26 public:
27 ImportDataHandler(); 27 ImportDataHandler();
28 virtual ~ImportDataHandler(); 28 virtual ~ImportDataHandler();
29 29
30 // OptionsPageUIHandler: 30 // OptionsPageUIHandler:
31 virtual void GetLocalizedValues( 31 virtual void GetLocalizedValues(
32 base::DictionaryValue* localized_strings) OVERRIDE; 32 base::DictionaryValue* localized_strings) OVERRIDE;
33 virtual void Initialize() OVERRIDE; 33 virtual void InitializeHandler() OVERRIDE;
34 virtual void InitializePage() OVERRIDE;
34 35
35 // WebUIMessageHandler: 36 // WebUIMessageHandler:
36 virtual void RegisterMessages() OVERRIDE; 37 virtual void RegisterMessages() OVERRIDE;
37 38
38 private: 39 private:
39 void ImportData(const base::ListValue* args); 40 void ImportData(const base::ListValue* args);
40 41
41 // importer::ImporterListObserver: 42 // importer::ImporterListObserver:
42 virtual void OnSourceProfilesLoaded() OVERRIDE; 43 virtual void OnSourceProfilesLoaded() OVERRIDE;
43 44
44 // importer::ImporterProgressObserver: 45 // importer::ImporterProgressObserver:
45 virtual void ImportStarted() OVERRIDE; 46 virtual void ImportStarted() OVERRIDE;
46 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; 47 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE;
47 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; 48 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE;
48 virtual void ImportEnded() OVERRIDE; 49 virtual void ImportEnded() OVERRIDE;
49 50
50 scoped_refptr<ImporterList> importer_list_; 51 scoped_refptr<ImporterList> importer_list_;
51 52
52 // If non-null it means importing is in progress. ImporterHost takes care 53 // If non-null it means importing is in progress. ImporterHost takes care
53 // of deleting itself when import is complete. 54 // of deleting itself when import is complete.
54 ImporterHost* importer_host_; // weak 55 ImporterHost* importer_host_; // weak
55 56
56 bool import_did_succeed_; 57 bool import_did_succeed_;
58 bool profiles_loaded_;
57 59
58 DISALLOW_COPY_AND_ASSIGN(ImportDataHandler); 60 DISALLOW_COPY_AND_ASSIGN(ImportDataHandler);
59 }; 61 };
60 62
61 } // namespace options2 63 } // namespace options2
62 64
63 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_ 65 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_IMPORT_DATA_HANDLER2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698