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

Side by Side Diff: chrome/renderer/translate/translate_helper.cc

Issue 219963007: Move Translate renderer messages to the Translate component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/renderer/translate/translate_helper.h" 5 #include "chrome/renderer/translate/translate_helper.h"
6 6
7 #if defined(CLD2_DYNAMIC_MODE) 7 #if defined(CLD2_DYNAMIC_MODE)
8 #include <stdint.h> 8 #include <stdint.h>
9 #endif 9 #endif
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #if defined(CLD2_DYNAMIC_MODE) 13 #if defined(CLD2_DYNAMIC_MODE)
14 #include "base/files/memory_mapped_file.h" 14 #include "base/files/memory_mapped_file.h"
15 #endif 15 #endif
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "chrome/common/render_messages.h"
22 #include "chrome/renderer/extensions/extension_groups.h" 21 #include "chrome/renderer/extensions/extension_groups.h"
23 #include "chrome/renderer/isolated_world_ids.h" 22 #include "chrome/renderer/isolated_world_ids.h"
23 #include "components/translate/content/common/translate_messages.h"
24 #include "components/translate/core/common/translate_constants.h" 24 #include "components/translate/core/common/translate_constants.h"
25 #include "components/translate/core/common/translate_metrics.h" 25 #include "components/translate/core/common/translate_metrics.h"
26 #include "components/translate/core/common/translate_util.h" 26 #include "components/translate/core/common/translate_util.h"
27 #include "components/translate/language_detection/language_detection_util.h" 27 #include "components/translate/language_detection/language_detection_util.h"
28 #include "content/public/renderer/render_view.h" 28 #include "content/public/renderer/render_view.h"
29 #include "extensions/common/constants.h" 29 #include "extensions/common/constants.h"
30 #include "ipc/ipc_platform_file.h" 30 #include "ipc/ipc_platform_file.h"
31 #if defined(CLD2_DYNAMIC_MODE) 31 #if defined(CLD2_DYNAMIC_MODE)
32 #include "content/public/common/url_constants.h" 32 #include "content/public/common/url_constants.h"
33 #include "third_party/cld_2/src/public/compact_lang_det.h" 33 #include "third_party/cld_2/src/public/compact_lang_det.h"
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 s_cld_mmap_.Get().value = NULL; 677 s_cld_mmap_.Get().value = NULL;
678 return; 678 return;
679 } 679 }
680 680
681 // Initialize the CLD subsystem... and it's all done! 681 // Initialize the CLD subsystem... and it's all done!
682 const uint8* data_ptr = s_cld_mmap_.Get().value->data() + data_offset; 682 const uint8* data_ptr = s_cld_mmap_.Get().value->data() + data_offset;
683 CLD2::loadDataFromRawAddress(data_ptr, data_length); 683 CLD2::loadDataFromRawAddress(data_ptr, data_length);
684 DCHECK(CLD2::isDataLoaded()) << "Failed to load CLD data from mmap"; 684 DCHECK(CLD2::isDataLoaded()) << "Failed to load CLD data from mmap";
685 } 685 }
686 #endif 686 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698