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

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

Issue 7978039: net: Put more functions from escape.h into net namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« no previous file with comments | « chrome/browser/search_engines/template_url.cc ('k') | chrome/browser/ui/webui/history2_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 #include "grit/generated_resources.h" 148 #include "grit/generated_resources.h"
149 #include "grit/locale_settings.h" 149 #include "grit/locale_settings.h"
150 #include "grit/theme_resources_standard.h" 150 #include "grit/theme_resources_standard.h"
151 #include "net/base/cookie_monster.h" 151 #include "net/base/cookie_monster.h"
152 #include "net/base/net_util.h" 152 #include "net/base/net_util.h"
153 #include "net/base/registry_controlled_domain.h" 153 #include "net/base/registry_controlled_domain.h"
154 #include "net/url_request/url_request_context.h" 154 #include "net/url_request/url_request_context.h"
155 #include "ui/base/animation/animation.h" 155 #include "ui/base/animation/animation.h"
156 #include "ui/base/l10n/l10n_util.h" 156 #include "ui/base/l10n/l10n_util.h"
157 #include "ui/gfx/point.h" 157 #include "ui/gfx/point.h"
158 #include "webkit/glue/web_intent_data.h"
158 #include "webkit/glue/webkit_glue.h" 159 #include "webkit/glue/webkit_glue.h"
159 #include "webkit/glue/web_intent_data.h"
160 #include "webkit/glue/window_open_disposition.h" 160 #include "webkit/glue/window_open_disposition.h"
161 161
162 #if defined(OS_WIN) 162 #if defined(OS_WIN)
163 #include "chrome/browser/autofill/autofill_ie_toolbar_import_win.h" 163 #include "chrome/browser/autofill/autofill_ie_toolbar_import_win.h"
164 #include "chrome/browser/shell_integration.h" 164 #include "chrome/browser/shell_integration.h"
165 #include "chrome/browser/ssl/ssl_error_info.h" 165 #include "chrome/browser/ssl/ssl_error_info.h"
166 #include "chrome/browser/task_manager/task_manager.h" 166 #include "chrome/browser/task_manager/task_manager.h"
167 #include "chrome/browser/ui/view_ids.h" 167 #include "chrome/browser/ui/view_ids.h"
168 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 168 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
169 #include "ui/base/win/shell.h" 169 #include "ui/base/win/shell.h"
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 1784
1785 bool Browser::CanSupportWindowFeature(WindowFeature feature) const { 1785 bool Browser::CanSupportWindowFeature(WindowFeature feature) const {
1786 return SupportsWindowFeatureImpl(feature, false); 1786 return SupportsWindowFeatureImpl(feature, false);
1787 } 1787 }
1788 1788
1789 void Browser::EmailPageLocation() { 1789 void Browser::EmailPageLocation() {
1790 UserMetrics::RecordAction(UserMetricsAction("EmailPageLocation")); 1790 UserMetrics::RecordAction(UserMetricsAction("EmailPageLocation"));
1791 TabContents* tc = GetSelectedTabContents(); 1791 TabContents* tc = GetSelectedTabContents();
1792 DCHECK(tc); 1792 DCHECK(tc);
1793 1793
1794 std::string title = EscapeQueryParamValue(UTF16ToUTF8(tc->GetTitle()), false); 1794 std::string title = net::EscapeQueryParamValue(
1795 std::string page_url = EscapeQueryParamValue(tc->GetURL().spec(), false); 1795 UTF16ToUTF8(tc->GetTitle()), false);
1796 std::string page_url = net::EscapeQueryParamValue(tc->GetURL().spec(), false);
1796 std::string mailto = std::string("mailto:?subject=Fwd:%20") + 1797 std::string mailto = std::string("mailto:?subject=Fwd:%20") +
1797 title + "&body=%0A%0A" + page_url; 1798 title + "&body=%0A%0A" + page_url;
1798 platform_util::OpenExternal(GURL(mailto)); 1799 platform_util::OpenExternal(GURL(mailto));
1799 } 1800 }
1800 1801
1801 void Browser::Print() { 1802 void Browser::Print() {
1802 if (switches::IsPrintPreviewEnabled()) 1803 if (switches::IsPrintPreviewEnabled())
1803 GetSelectedTabContentsWrapper()->print_view_manager()->PrintPreviewNow(); 1804 GetSelectedTabContentsWrapper()->print_view_manager()->PrintPreviewNow();
1804 else 1805 else
1805 GetSelectedTabContentsWrapper()->print_view_manager()->PrintNow(); 1806 GetSelectedTabContentsWrapper()->print_view_manager()->PrintNow();
(...skipping 3468 matching lines...) Expand 10 before | Expand all | Expand 10 after
5274 } else if (is_type_tabbed()) { 5275 } else if (is_type_tabbed()) {
5275 GlobalErrorService* service = 5276 GlobalErrorService* service =
5276 GlobalErrorServiceFactory::GetForProfile(profile()); 5277 GlobalErrorServiceFactory::GetForProfile(profile());
5277 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5278 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5278 if (error) { 5279 if (error) {
5279 error->ShowBubbleView(this); 5280 error->ShowBubbleView(this);
5280 did_show_bubble = true; 5281 did_show_bubble = true;
5281 } 5282 }
5282 } 5283 }
5283 } 5284 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url.cc ('k') | chrome/browser/ui/webui/history2_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698