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

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: validation images and button-strip fixups 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 #include "chrome/browser/ui/omnibox/location_bar.h" 106 #include "chrome/browser/ui/omnibox/location_bar.h"
107 #include "chrome/browser/ui/panels/panel.h" 107 #include "chrome/browser/ui/panels/panel.h"
108 #include "chrome/browser/ui/panels/panel_manager.h" 108 #include "chrome/browser/ui/panels/panel_manager.h"
109 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" 109 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h"
110 #include "chrome/browser/ui/status_bubble.h" 110 #include "chrome/browser/ui/status_bubble.h"
111 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 111 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
112 #include "chrome/browser/ui/tabs/dock_info.h" 112 #include "chrome/browser/ui/tabs/dock_info.h"
113 #include "chrome/browser/ui/tabs/tab_menu_model.h" 113 #include "chrome/browser/ui/tabs/tab_menu_model.h"
114 #include "chrome/browser/ui/web_applications/web_app_ui.h" 114 #include "chrome/browser/ui/web_applications/web_app_ui.h"
115 #include "chrome/browser/ui/webui/bug_report_ui.h" 115 #include "chrome/browser/ui/webui/bug_report_ui.h"
116 #include "chrome/browser/ui/webui/chrome_web_ui.h"
116 #include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h" 117 #include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
117 #include "chrome/browser/ui/webui/options/content_settings_handler.h" 118 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
118 #include "chrome/browser/ui/window_sizer.h" 119 #include "chrome/browser/ui/window_sizer.h"
119 #include "chrome/browser/upgrade_detector.h" 120 #include "chrome/browser/upgrade_detector.h"
120 #include "chrome/browser/web_applications/web_app.h" 121 #include "chrome/browser/web_applications/web_app.h"
121 #include "chrome/common/chrome_constants.h" 122 #include "chrome/common/chrome_constants.h"
122 #include "chrome/common/chrome_notification_types.h" 123 #include "chrome/common/chrome_notification_types.h"
123 #include "chrome/common/chrome_switches.h" 124 #include "chrome/common/chrome_switches.h"
124 #include "chrome/common/custom_handlers/protocol_handler.h" 125 #include "chrome/common/custom_handlers/protocol_handler.h"
125 #include "chrome/common/extensions/extension.h" 126 #include "chrome/common/extensions/extension.h"
(...skipping 3818 matching lines...) Expand 10 before | Expand all | Expand 10 after
3944 void Browser::ConfirmSetDefaultSearchProvider( 3945 void Browser::ConfirmSetDefaultSearchProvider(
3945 TabContents* tab_contents, 3946 TabContents* tab_contents,
3946 TemplateURL* template_url, 3947 TemplateURL* template_url,
3947 TemplateURLService* template_url_service) { 3948 TemplateURLService* template_url_service) {
3948 window()->ConfirmSetDefaultSearchProvider(tab_contents, template_url, 3949 window()->ConfirmSetDefaultSearchProvider(tab_contents, template_url,
3949 template_url_service); 3950 template_url_service);
3950 } 3951 }
3951 3952
3952 void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url, 3953 void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url,
3953 Profile* profile) { 3954 Profile* profile) {
3954 window()->ConfirmAddSearchProvider(template_url, profile); 3955 // If we are using web UI dialogs, then redirect this dialog to the web UI
3956 // version. Otherwise, call the existing framework, which is called by way of
3957 // window()->ConfirmAddSearchProvider.
3958 if (ChromeWebUI::IsMoreWebUI()) {
3959 // Call a clean API to confirm adding a search provider.
3960 browser::ConfirmAddSearchProvider(template_url, profile);
3961 } else {
3962 window()->ConfirmAddSearchProvider(template_url, profile);
3963 }
3955 } 3964 }
3956 3965
3957 /////////////////////////////////////////////////////////////////////////////// 3966 ///////////////////////////////////////////////////////////////////////////////
3958 // Browser, BlockedContentTabHelperDelegate implementation: 3967 // Browser, BlockedContentTabHelperDelegate implementation:
3959 3968
3960 TabContentsWrapper* Browser::GetConstrainingContentsWrapper( 3969 TabContentsWrapper* Browser::GetConstrainingContentsWrapper(
3961 TabContentsWrapper* source) { 3970 TabContentsWrapper* source) {
3962 return source; 3971 return source;
3963 } 3972 }
3964 3973
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
5299 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); 5308 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
5300 } else if (is_type_tabbed()) { 5309 } else if (is_type_tabbed()) {
5301 GlobalErrorService* service = 5310 GlobalErrorService* service =
5302 GlobalErrorServiceFactory::GetForProfile(profile()); 5311 GlobalErrorServiceFactory::GetForProfile(profile());
5303 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5312 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5304 if (error) { 5313 if (error) {
5305 error->ShowBubbleView(this); 5314 error->ShowBubbleView(this);
5306 } 5315 }
5307 } 5316 }
5308 } 5317 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698