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

Side by Side 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 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 #include "chrome/browser/ui/omnibox/location_bar.h" 112 #include "chrome/browser/ui/omnibox/location_bar.h"
113 #include "chrome/browser/ui/panels/panel.h" 113 #include "chrome/browser/ui/panels/panel.h"
114 #include "chrome/browser/ui/panels/panel_manager.h" 114 #include "chrome/browser/ui/panels/panel_manager.h"
115 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" 115 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
116 #include "chrome/browser/ui/status_bubble.h" 116 #include "chrome/browser/ui/status_bubble.h"
117 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 117 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
118 #include "chrome/browser/ui/tabs/dock_info.h" 118 #include "chrome/browser/ui/tabs/dock_info.h"
119 #include "chrome/browser/ui/tabs/tab_menu_model.h" 119 #include "chrome/browser/ui/tabs/tab_menu_model.h"
120 #include "chrome/browser/ui/web_applications/web_app_ui.h" 120 #include "chrome/browser/ui/web_applications/web_app_ui.h"
121 #include "chrome/browser/ui/webui/bug_report_ui.h" 121 #include "chrome/browser/ui/webui/bug_report_ui.h"
122 #include "chrome/browser/ui/webui/chrome_web_ui.h"
122 #include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h" 123 #include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
123 #include "chrome/browser/ui/webui/options/content_settings_handler.h" 124 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
124 #include "chrome/browser/ui/window_sizer.h" 125 #include "chrome/browser/ui/window_sizer.h"
125 #include "chrome/browser/upgrade_detector.h" 126 #include "chrome/browser/upgrade_detector.h"
126 #include "chrome/browser/web_applications/web_app.h" 127 #include "chrome/browser/web_applications/web_app.h"
127 #include "chrome/common/chrome_constants.h" 128 #include "chrome/common/chrome_constants.h"
128 #include "chrome/common/chrome_notification_types.h" 129 #include "chrome/common/chrome_notification_types.h"
129 #include "chrome/common/chrome_switches.h" 130 #include "chrome/common/chrome_switches.h"
130 #include "chrome/common/custom_handlers/protocol_handler.h" 131 #include "chrome/common/custom_handlers/protocol_handler.h"
131 #include "chrome/common/extensions/extension.h" 132 #include "chrome/common/extensions/extension.h"
(...skipping 3922 matching lines...) Expand 10 before | Expand all | Expand 10 after
4054 4055
4055 void Browser::ConfirmSetDefaultSearchProvider(TabContents* tab_contents, 4056 void Browser::ConfirmSetDefaultSearchProvider(TabContents* tab_contents,
4056 TemplateURL* template_url, 4057 TemplateURL* template_url,
4057 Profile* profile) { 4058 Profile* profile) {
4058 window()->ConfirmSetDefaultSearchProvider(tab_contents, template_url, 4059 window()->ConfirmSetDefaultSearchProvider(tab_contents, template_url,
4059 profile); 4060 profile);
4060 } 4061 }
4061 4062
4062 void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url, 4063 void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url,
4063 Profile* profile) { 4064 Profile* profile) {
4064 window()->ConfirmAddSearchProvider(template_url, profile); 4065 // If we are using web UI dialogs, then redirect this dialog to the web UI
4066 // version. Otherwise, call the existing framework, which is called by way of
4067 // window()->ConfirmAddSearchProvider.
4068 if (ChromeWebUI::IsMoreWebUI()) {
4069 // Call a clean API to confirm adding a search provider.
4070 browser::ConfirmAddSearchProvider(template_url, profile);
4071 } else {
4072 window()->ConfirmAddSearchProvider(template_url, profile);
4073 }
4065 } 4074 }
4066 4075
4067 /////////////////////////////////////////////////////////////////////////////// 4076 ///////////////////////////////////////////////////////////////////////////////
4068 // Browser, BlockedContentTabHelperDelegate implementation: 4077 // Browser, BlockedContentTabHelperDelegate implementation:
4069 4078
4070 TabContentsWrapper* Browser::GetConstrainingContentsWrapper( 4079 TabContentsWrapper* Browser::GetConstrainingContentsWrapper(
4071 TabContentsWrapper* source) { 4080 TabContentsWrapper* source) {
4072 return source; 4081 return source;
4073 } 4082 }
4074 4083
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
5351 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); 5360 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
5352 } else if (is_type_tabbed()) { 5361 } else if (is_type_tabbed()) {
5353 GlobalErrorService* service = 5362 GlobalErrorService* service =
5354 GlobalErrorServiceFactory::GetForProfile(profile()); 5363 GlobalErrorServiceFactory::GetForProfile(profile());
5355 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5364 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5356 if (error) { 5365 if (error) {
5357 error->ShowBubbleView(this); 5366 error->ShowBubbleView(this);
5358 } 5367 }
5359 } 5368 }
5360 } 5369 }
OLDNEW
« 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