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

Side by Side Diff: components/translate/content/browser/content_translate_driver.cc

Issue 378253002: Fix translate namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing android build errors Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/translate/content/browser/content_translate_driver.h" 5 #include "components/translate/content/browser/content_translate_driver.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/translate/content/common/translate_messages.h" 8 #include "components/translate/content/common/translate_messages.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
11 #include "content/public/browser/navigation_entry.h" 11 #include "content/public/browser/navigation_entry.h"
12 #include "content/public/browser/page_navigator.h" 12 #include "content/public/browser/page_navigator.h"
13 #include "content/public/browser/render_view_host.h" 13 #include "content/public/browser/render_view_host.h"
14 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
15 #include "content/public/common/referrer.h" 15 #include "content/public/common/referrer.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 namespace translate {
19
18 ContentTranslateDriver::ContentTranslateDriver( 20 ContentTranslateDriver::ContentTranslateDriver(
19 content::NavigationController* nav_controller) 21 content::NavigationController* nav_controller)
20 : navigation_controller_(nav_controller), 22 : navigation_controller_(nav_controller),
21 observer_(NULL) { 23 observer_(NULL) {
22 DCHECK(navigation_controller_); 24 DCHECK(navigation_controller_);
23 } 25 }
24 26
25 ContentTranslateDriver::~ContentTranslateDriver() {} 27 ContentTranslateDriver::~ContentTranslateDriver() {}
26 28
27 // TranslateDriver methods 29 // TranslateDriver methods
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 100 }
99 101
100 void ContentTranslateDriver::OpenUrlInNewTab(const GURL& url) { 102 void ContentTranslateDriver::OpenUrlInNewTab(const GURL& url) {
101 content::OpenURLParams params(url, 103 content::OpenURLParams params(url,
102 content::Referrer(), 104 content::Referrer(),
103 NEW_FOREGROUND_TAB, 105 NEW_FOREGROUND_TAB,
104 content::PAGE_TRANSITION_LINK, 106 content::PAGE_TRANSITION_LINK,
105 false); 107 false);
106 navigation_controller_->GetWebContents()->OpenURL(params); 108 navigation_controller_->GetWebContents()->OpenURL(params);
107 } 109 }
110
111 } // namespace translate
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698