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

Side by Side Diff: chrome/browser/ui/webui/options/pack_extension_handler.cc

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: copyright bumps 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) 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/webui/options/pack_extension_handler.h" 5 #include "chrome/browser/ui/webui/options/pack_extension_handler.h"
6 6
7 #include "chrome/browser/extensions/extension_creator.h" 7 #include "chrome/browser/extensions/extension_creator.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/public/browser/web_ui.h" 10 #include "content/public/browser/web_ui.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 13
14 PackExtensionHandler::PackExtensionHandler() { 14 PackExtensionHandler::PackExtensionHandler() {
15 } 15 }
16 16
17 PackExtensionHandler::~PackExtensionHandler() { 17 PackExtensionHandler::~PackExtensionHandler() {
18 if (pack_job_.get()) 18 if (pack_job_.get())
19 pack_job_->ClearClient(); 19 pack_job_->ClearClient();
20 } 20 }
21 21
22 void PackExtensionHandler::Initialize() {
23 }
24
25 void PackExtensionHandler::GetLocalizedValues( 22 void PackExtensionHandler::GetLocalizedValues(
26 DictionaryValue* localized_strings) { 23 DictionaryValue* localized_strings) {
27 DCHECK(localized_strings); 24 DCHECK(localized_strings);
28 RegisterTitle(localized_strings, "packExtensionOverlay", 25 RegisterTitle(localized_strings, "packExtensionOverlay",
29 IDS_EXTENSION_PACK_DIALOG_TITLE); 26 IDS_EXTENSION_PACK_DIALOG_TITLE);
30 27
31 localized_strings->SetString("packExtensionOverlay", 28 localized_strings->SetString("packExtensionOverlay",
32 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_TITLE)); 29 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_TITLE));
33 localized_strings->SetString("packExtensionHeading", 30 localized_strings->SetString("packExtensionHeading",
34 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_HEADING)); 31 l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_HEADING));
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 115
119 pack_job_ = new PackExtensionJob(this, root_directory, key_file, run_flags); 116 pack_job_ = new PackExtensionJob(this, root_directory, key_file, run_flags);
120 pack_job_->Start(); 117 pack_job_->Start();
121 } 118 }
122 119
123 void PackExtensionHandler::ShowAlert(const std::string& message) { 120 void PackExtensionHandler::ShowAlert(const std::string& message) {
124 ListValue arguments; 121 ListValue arguments;
125 arguments.Append(Value::CreateStringValue(message)); 122 arguments.Append(Value::CreateStringValue(message));
126 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments); 123 web_ui()->CallJavascriptFunction("PackExtensionOverlay.showError", arguments);
127 } 124 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/pack_extension_handler.h ('k') | chrome/browser/ui/webui/options/password_manager_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698