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

Side by Side Diff: chrome/browser/ui/webui/edit_search_engine_dialog_webui.cc

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 #include "chrome/browser/ui/webui/edit_search_engine_dialog_webui.h" 5 #include "chrome/browser/ui/webui/edit_search_engine_dialog_webui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/json/json_reader.h" 12 #include "base/json/json_reader.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/search_engines/template_url.h" 15 #include "chrome/browser/search_engines/template_url.h"
16 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/browser_list.h" 17 #include "chrome/browser/ui/browser_list.h"
18 #include "chrome/browser/ui/dialog_style.h" 18 #include "chrome/browser/ui/dialog_style.h"
19 #include "chrome/browser/ui/search_engines/edit_search_engine_controller.h" 19 #include "chrome/browser/ui/search_engines/edit_search_engine_controller.h"
20 #include "chrome/browser/ui/webui/theme_source.h" 20 #include "chrome/browser/ui/webui/theme_source.h"
21 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
22 #include "content/browser/webui/web_ui.h"
22 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
23 #include "grit/theme_resources.h" 24 #include "grit/theme_resources.h"
24 #include "grit/ui_resources.h" 25 #include "grit/ui_resources.h"
25 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
26 27
27 using content::WebContents; 28 using content::WebContents;
29 using content::WebUIMessageHandler;
28 30
29 namespace { 31 namespace {
30 const int kEditSearchEngineDialogWidth = 440; 32 const int kEditSearchEngineDialogWidth = 440;
31 const int kEditSearchEngineDialogHeight = 196; 33 const int kEditSearchEngineDialogHeight = 196;
32 } 34 }
33 35
34 //////////////////////////////////////////////////////////////////////////////// 36 ////////////////////////////////////////////////////////////////////////////////
35 // Browser dialog API implementation 37 // Browser dialog API implementation
36 38
37 namespace browser { 39 namespace browser {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 dict->GetString("keyword", &keyword_str) && 188 dict->GetString("keyword", &keyword_str) &&
187 dict->GetString("url", &url_str)) { 189 dict->GetString("url", &url_str)) {
188 controller_->AcceptAddOrEdit(description_str, 190 controller_->AcceptAddOrEdit(description_str,
189 keyword_str, 191 keyword_str,
190 url_str); 192 url_str);
191 } else { 193 } else {
192 controller_->CleanUpCancelledAdd(); 194 controller_->CleanUpCancelledAdd();
193 } 195 }
194 } 196 }
195 } 197 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/edit_search_engine_dialog_webui.h ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698