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

Side by Side Diff: chrome/browser/translate/translate_manager.cc

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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) 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/translate/translate_manager.h" 5 #include "chrome/browser/translate/translate_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 TranslateInfoBarDelegate::TRANSLATING, infobar_helper, 610 TranslateInfoBarDelegate::TRANSLATING, infobar_helper,
611 wrapper->profile()->GetPrefs(), source_lang, target_lang)); 611 wrapper->profile()->GetPrefs(), source_lang, target_lang));
612 612
613 if (!translate_script_.empty()) { 613 if (!translate_script_.empty()) {
614 DoTranslatePage(web_contents, translate_script_, source_lang, target_lang); 614 DoTranslatePage(web_contents, translate_script_, source_lang, target_lang);
615 return; 615 return;
616 } 616 }
617 617
618 // The script is not available yet. Queue that request and query for the 618 // The script is not available yet. Queue that request and query for the
619 // script. Once it is downloaded we'll do the translate. 619 // script. Once it is downloaded we'll do the translate.
620 RenderViewHost* rvh = web_contents->GetRenderViewHost(); 620 content::RenderViewHost* rvh = web_contents->GetRenderViewHost();
621 PendingRequest request; 621 PendingRequest request;
622 request.render_process_id = rvh->GetProcess()->GetID(); 622 request.render_process_id = rvh->GetProcess()->GetID();
623 request.render_view_id = rvh->GetRoutingID(); 623 request.render_view_id = rvh->GetRoutingID();
624 request.page_id = entry->GetPageID(); 624 request.page_id = entry->GetPageID();
625 request.source_lang = source_lang; 625 request.source_lang = source_lang;
626 request.target_lang = target_lang; 626 request.target_lang = target_lang;
627 pending_requests_.push_back(request); 627 pending_requests_.push_back(request);
628 RequestTranslateScript(); 628 RequestTranslateScript();
629 } 629 }
630 630
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper(); 875 InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper();
876 876
877 for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) { 877 for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) {
878 TranslateInfoBarDelegate* delegate = 878 TranslateInfoBarDelegate* delegate =
879 infobar_helper->GetInfoBarDelegateAt(i)->AsTranslateInfoBarDelegate(); 879 infobar_helper->GetInfoBarDelegateAt(i)->AsTranslateInfoBarDelegate();
880 if (delegate) 880 if (delegate)
881 return delegate; 881 return delegate;
882 } 882 }
883 return NULL; 883 return NULL;
884 } 884 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | chrome/browser/ui/alternate_error_tab_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698