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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 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 "chrome/browser/translate/chrome_translate_client.h" 5 #include "chrome/browser/translate/chrome_translate_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 NOTREACHED(); 253 NOTREACHED();
254 #else 254 #else
255 // We'll open the URL in a new tab so that the user can tell us more. 255 // We'll open the URL in a new tab so that the user can tell us more.
256 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); 256 Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
257 if (!browser) { 257 if (!browser) {
258 NOTREACHED(); 258 NOTREACHED();
259 return; 259 return;
260 } 260 }
261 261
262 chrome::AddSelectedTabWithURL( 262 chrome::AddSelectedTabWithURL(
263 browser, report_url, content::PAGE_TRANSITION_AUTO_BOOKMARK); 263 browser, report_url, ui::PAGE_TRANSITION_AUTO_BOOKMARK);
264 #endif // defined(OS_ANDROID) 264 #endif // defined(OS_ANDROID)
265 } 265 }
266 266
267 bool ChromeTranslateClient::OnMessageReceived(const IPC::Message& message) { 267 bool ChromeTranslateClient::OnMessageReceived(const IPC::Message& message) {
268 return cld_data_provider_->OnMessageReceived(message); 268 return cld_data_provider_->OnMessageReceived(message);
269 } 269 }
270 270
271 void ChromeTranslateClient::WebContentsDestroyed() { 271 void ChromeTranslateClient::WebContentsDestroyed() {
272 // Translation process can be interrupted. 272 // Translation process can be interrupted.
273 // Destroying the TranslateManager now guarantees that it never has to deal 273 // Destroying the TranslateManager now guarantees that it never has to deal
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 if (GetLanguageState().InTranslateNavigation()) 337 if (GetLanguageState().InTranslateNavigation())
338 return; 338 return;
339 } 339 }
340 340
341 TranslateBubbleFactory::Show( 341 TranslateBubbleFactory::Show(
342 browser->window(), web_contents(), step, error_type); 342 browser->window(), web_contents(), step, error_type);
343 #else 343 #else
344 NOTREACHED(); 344 NOTREACHED();
345 #endif 345 #endif
346 } 346 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698