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

Unified Diff: chrome/browser/ui/browser.cc

Issue 8118012: WebUI Edit Search Engine Dialog (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: changed webui class names as per precedent Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/edit_search_engine_dialog.js ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index e2ed3b43ec6b1510ff90eb1b98a2bd9889e0664b..65b231016f7fd6b20ab4f453db542a410e7919a8 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -119,6 +119,7 @@
#include "chrome/browser/ui/tabs/tab_menu_model.h"
#include "chrome/browser/ui/web_applications/web_app_ui.h"
#include "chrome/browser/ui/webui/bug_report_ui.h"
+#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
#include "chrome/browser/ui/webui/options/content_settings_handler.h"
#include "chrome/browser/ui/window_sizer.h"
@@ -4061,7 +4062,15 @@ void Browser::ConfirmSetDefaultSearchProvider(TabContents* tab_contents,
void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url,
Profile* profile) {
- window()->ConfirmAddSearchProvider(template_url, profile);
+ // If we are using web UI dialogs, then redirect this dialog to the web UI
+ // version. Otherwise, call the existing framework, which is called by way of
+ // window()->ConfirmAddSearchProvider.
+ if (ChromeWebUI::IsMoreWebUI()) {
+ // Call a clean API to confirm adding a search provider.
+ browser::ConfirmAddSearchProvider(template_url, profile);
+ } else {
+ window()->ConfirmAddSearchProvider(template_url, profile);
+ }
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/resources/edit_search_engine_dialog.js ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698