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

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

Issue 274593003: Fix "Search Google for this image" after r268939 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/ui/tab_contents/core_tab_helper.h ('k') | no next file » | 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) 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/command_line.h" 10 #include "base/command_line.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 void CoreTabHelper::BeforeUnloadFired(const base::TimeTicks& proceed_time) { 183 void CoreTabHelper::BeforeUnloadFired(const base::TimeTicks& proceed_time) {
184 before_unload_end_time_ = proceed_time; 184 before_unload_end_time_ = proceed_time;
185 } 185 }
186 186
187 void CoreTabHelper::BeforeUnloadDialogCancelled() { 187 void CoreTabHelper::BeforeUnloadDialogCancelled() {
188 OnCloseCanceled(); 188 OnCloseCanceled();
189 } 189 }
190 190
191 bool CoreTabHelper::OnMessageReceived(const IPC::Message& message) { 191 bool CoreTabHelper::OnMessageReceived(
192 const IPC::Message& message,
193 content::RenderFrameHost* render_frame_host) {
192 bool handled = true; 194 bool handled = true;
193 IPC_BEGIN_MESSAGE_MAP(CoreTabHelper, message) 195 IPC_BEGIN_MESSAGE_MAP(CoreTabHelper, message)
194 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK, 196 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK,
195 OnRequestThumbnailForContextNodeACK) 197 OnRequestThumbnailForContextNodeACK)
196 IPC_MESSAGE_UNHANDLED(handled = false) 198 IPC_MESSAGE_UNHANDLED(handled = false)
197 IPC_END_MESSAGE_MAP() 199 IPC_END_MESSAGE_MAP()
198 return handled; 200 return handled;
199 } 201 }
200 202
201 // Handles the image thumbnail for the context node, composes a image search 203 // Handles the image thumbnail for the context node, composes a image search
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 DCHECK(!content_type.empty()); 250 DCHECK(!content_type.empty());
249 open_url_params.uses_post = true; 251 open_url_params.uses_post = true;
250 open_url_params.browser_initiated_post_data = 252 open_url_params.browser_initiated_post_data =
251 base::RefCountedString::TakeString(post_data); 253 base::RefCountedString::TakeString(post_data);
252 open_url_params.extra_headers += base::StringPrintf( 254 open_url_params.extra_headers += base::StringPrintf(
253 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, 255 "%s: %s\r\n", net::HttpRequestHeaders::kContentType,
254 content_type.c_str()); 256 content_type.c_str());
255 } 257 }
256 web_contents()->OpenURL(open_url_params); 258 web_contents()->OpenURL(open_url_params);
257 } 259 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698