| OLD | NEW |
| 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/renderer_host/chrome_render_view_host_observer.h" | 5 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
| 13 #include "chrome/browser/extensions/extension_system.h" | 13 #include "chrome/browser/extensions/extension_system.h" |
| 14 #include "chrome/browser/net/predictor.h" | 14 #include "chrome/browser/net/predictor.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/search_engines/search_terms_data.h" | 16 #include "chrome/browser/search_engines/search_terms_data.h" |
| 17 #include "chrome/browser/search_engines/template_url.h" | 17 #include "chrome/browser/search_engines/template_url.h" |
| 18 #include "chrome/browser/search_engines/template_url_service.h" | 18 #include "chrome/browser/search_engines/template_url_service.h" |
| 19 #include "chrome/browser/search_engines/template_url_service_factory.h" | 19 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
| 21 #include "chrome/common/extensions/extension.h" | 21 #include "chrome/common/extensions/extension.h" |
| 22 #include "chrome/common/extensions/extension_messages.h" | 22 #include "chrome/common/extensions/extension_messages.h" |
| 23 #include "chrome/common/extensions/manifest.h" | |
| 24 #include "chrome/common/render_messages.h" | 23 #include "chrome/common/render_messages.h" |
| 25 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 26 #include "content/public/browser/child_process_security_policy.h" | 25 #include "content/public/browser/child_process_security_policy.h" |
| 27 #include "content/public/browser/page_navigator.h" | 26 #include "content/public/browser/page_navigator.h" |
| 28 #include "content/public/browser/render_process_host.h" | 27 #include "content/public/browser/render_process_host.h" |
| 29 #include "content/public/browser/render_view_host.h" | 28 #include "content/public/browser/render_view_host.h" |
| 30 #include "content/public/browser/site_instance.h" | 29 #include "content/public/browser/site_instance.h" |
| 31 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
| 32 #include "content/public/common/page_transition_types.h" | 31 #include "content/public/common/page_transition_types.h" |
| 33 #include "extensions/common/constants.h" | 32 #include "extensions/common/constants.h" |
| 33 #include "extensions/common/manifest.h" |
| 34 #include "net/http/http_request_headers.h" | 34 #include "net/http/http_request_headers.h" |
| 35 #include "third_party/skia/include/core/SkBitmap.h" | 35 #include "third_party/skia/include/core/SkBitmap.h" |
| 36 #include "ui/base/window_open_disposition.h" | 36 #include "ui/base/window_open_disposition.h" |
| 37 #include "ui/gfx/codec/jpeg_codec.h" | 37 #include "ui/gfx/codec/jpeg_codec.h" |
| 38 | 38 |
| 39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 40 #include "base/win/win_util.h" | 40 #include "base/win/win_util.h" |
| 41 #endif // OS_WIN | 41 #endif // OS_WIN |
| 42 | 42 |
| 43 using content::ChildProcessSecurityPolicy; | 43 using content::ChildProcessSecurityPolicy; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 DCHECK(!content_type.empty()); | 235 DCHECK(!content_type.empty()); |
| 236 open_url_params.uses_post = true; | 236 open_url_params.uses_post = true; |
| 237 open_url_params.browser_initiated_post_data = | 237 open_url_params.browser_initiated_post_data = |
| 238 base::RefCountedString::TakeString(post_data); | 238 base::RefCountedString::TakeString(post_data); |
| 239 open_url_params.extra_headers += base::StringPrintf( | 239 open_url_params.extra_headers += base::StringPrintf( |
| 240 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, | 240 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, |
| 241 content_type.c_str()); | 241 content_type.c_str()); |
| 242 } | 242 } |
| 243 web_contents->OpenURL(open_url_params); | 243 web_contents->OpenURL(open_url_params); |
| 244 } | 244 } |
| OLD | NEW |