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

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

Issue 2272173002: Fix most chrome/browser/ui "gn check" problems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tab_contents/core_tab_helper.h" 5 #include "chrome/browser/ui/tab_contents/core_tab_helper.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/command_line.h" 11 #include "base/command_line.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/profiler/scoped_tracker.h" 13 #include "base/profiler/scoped_tracker.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/search_engines/template_url_service_factory.h" 17 #include "chrome/browser/search_engines/template_url_service_factory.h"
18 #include "chrome/browser/ui/browser.h"
19 #include "chrome/browser/ui/browser_command_controller.h" 18 #include "chrome/browser/ui/browser_command_controller.h"
20 #include "chrome/browser/ui/browser_finder.h" 19 #include "chrome/browser/ui/browser_finder.h"
21 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
22 #include "chrome/common/render_messages.h" 21 #include "chrome/common/render_messages.h"
23 #include "chrome/grit/generated_resources.h" 22 #include "chrome/grit/generated_resources.h"
24 #include "components/guest_view/browser/guest_view_manager.h" 23 #include "components/guest_view/browser/guest_view_manager.h"
25 #include "components/search_engines/template_url.h" 24 #include "components/search_engines/template_url.h"
26 #include "components/search_engines/template_url_service.h" 25 #include "components/search_engines/template_url_service.h"
27 #include "components/strings/grit/components_strings.h" 26 #include "components/strings/grit/components_strings.h"
28 #include "components/web_cache/browser/web_cache_manager.h" 27 #include "components/web_cache/browser/web_cache_manager.h"
29 #include "content/public/browser/navigation_controller.h" 28 #include "content/public/browser/navigation_controller.h"
30 #include "content/public/browser/navigation_entry.h" 29 #include "content/public/browser/navigation_entry.h"
31 #include "content/public/browser/render_frame_host.h" 30 #include "content/public/browser/render_frame_host.h"
32 #include "content/public/browser/render_process_host.h" 31 #include "content/public/browser/render_process_host.h"
33 #include "content/public/browser/render_view_host.h" 32 #include "content/public/browser/render_view_host.h"
34 #include "content/public/browser/web_contents.h" 33 #include "content/public/browser/web_contents.h"
35 #include "content/public/common/context_menu_params.h" 34 #include "content/public/common/context_menu_params.h"
36 #include "content/public/common/ssl_status.h" 35 #include "content/public/common/ssl_status.h"
37 #include "net/base/load_states.h" 36 #include "net/base/load_states.h"
38 #include "net/base/url_util.h" 37 #include "net/base/url_util.h"
39 #include "net/http/http_request_headers.h" 38 #include "net/http/http_request_headers.h"
40 #include "ui/base/l10n/l10n_util.h" 39 #include "ui/base/l10n/l10n_util.h"
41 40
41 #if !defined(OS_ANDROID)
42 #include "chrome/browser/ui/browser.h"
43 #endif
44
42 using content::WebContents; 45 using content::WebContents;
43 46
44 namespace { 47 namespace {
45 48
46 const int kImageSearchThumbnailMinSize = 300 * 300; 49 const int kImageSearchThumbnailMinSize = 300 * 300;
47 const int kImageSearchThumbnailMaxWidth = 600; 50 const int kImageSearchThumbnailMaxWidth = 600;
48 const int kImageSearchThumbnailMaxHeight = 600; 51 const int kImageSearchThumbnailMaxHeight = 600;
49 52
50 } // namespace 53 } // namespace
51 54
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 DCHECK(!content_type.empty()); 389 DCHECK(!content_type.empty());
387 open_url_params.uses_post = true; 390 open_url_params.uses_post = true;
388 open_url_params.post_data = content::ResourceRequestBody::CreateFromBytes( 391 open_url_params.post_data = content::ResourceRequestBody::CreateFromBytes(
389 post_data.data(), post_data.size()); 392 post_data.data(), post_data.size());
390 open_url_params.extra_headers += base::StringPrintf( 393 open_url_params.extra_headers += base::StringPrintf(
391 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, 394 "%s: %s\r\n", net::HttpRequestHeaders::kContentType,
392 content_type.c_str()); 395 content_type.c_str());
393 } 396 }
394 web_contents()->OpenURL(open_url_params); 397 web_contents()->OpenURL(open_url_params);
395 } 398 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698