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

Side by Side Diff: components/translate/content/browser/browser_cld_data_provider.h

Issue 424053002: Add a new "Configure" mechanism to CLD browser-side data interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sorin@'s comments Created 6 years, 4 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 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 #ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_ 5 #ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_
6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_ 6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_
7 7
8 #include <string>
9
10 #include "base/files/file_path.h"
8 #include "ipc/ipc_listener.h" 11 #include "ipc/ipc_listener.h"
9 12
10 namespace IPC { 13 namespace IPC {
11 class Message; 14 class Message;
12 } 15 }
13 16
14 namespace content { 17 namespace content {
15 class WebContents; 18 class WebContents;
16 } 19 }
17 20
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // should take whatever action is appropriate for responding to the paired 55 // should take whatever action is appropriate for responding to the paired
53 // RendererCldDataProvider, typically by sending an IPC response. 56 // RendererCldDataProvider, typically by sending an IPC response.
54 virtual void SendCldDataResponse() = 0; 57 virtual void SendCldDataResponse() = 0;
55 }; 58 };
56 59
57 // Static factory function defined by the implementation that produces a new 60 // Static factory function defined by the implementation that produces a new
58 // provider for the specified WebContents. 61 // provider for the specified WebContents.
59 BrowserCldDataProvider* CreateBrowserCldDataProviderFor( 62 BrowserCldDataProvider* CreateBrowserCldDataProviderFor(
60 content::WebContents*); 63 content::WebContents*);
61 64
65 // For data sources that support a separate CLD data file, configures the path
66 // of that data file.
67 //
68 // The 'component' and 'standalone' data sources need this method to be called
69 // in order to locate the CLD data on disk.
70 // If the data source doesn't need or doesn't support such configuration, this
71 // function should do nothing. This is the case for, e.g., the static data
72 // source.
73 void SetCldDataFilePath(const base::FilePath& path);
74
75 // Returns the path most recently set by SetCldDataFilePath. The initial value
76 // prior to any such call is the empty path. If the data source doesn't support
77 // a data file, returns the empty path.
78 base::FilePath GetCldDataFilePath();
79
62 } // namespace translate 80 } // namespace translate
63 81
64 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATAP_PROVIDER_H_ 82 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_BROWSER_CLD_DATA_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/translate/content/browser/data_file_browser_cld_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698