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

Unified Diff: chrome/browser/extensions/execute_code_in_tab_function.h

Issue 7552028: Injected CSS localization fix (see bug no.) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated. Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/execute_code_in_tab_function.h
diff --git a/chrome/browser/extensions/execute_code_in_tab_function.h b/chrome/browser/extensions/execute_code_in_tab_function.h
index 2dbc115d1ba1fc8cbfa5a7218fc72ae12496d1fe..c653822d135af24d3bccc7154210790f2542262b 100644
--- a/chrome/browser/extensions/execute_code_in_tab_function.h
+++ b/chrome/browser/extensions/execute_code_in_tab_function.h
@@ -12,6 +12,8 @@
#include "chrome/common/extensions/extension_resource.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
+class MessageLoop;
+
// Implement API call tabs.executeScript and tabs.insertCSS.
class ExecuteCodeInTabFunction : public AsyncExtensionFunction,
public TabContentsObserver {
@@ -33,6 +35,18 @@ class ExecuteCodeInTabFunction : public AsyncExtensionFunction,
// arguments has been loaded.
void DidLoadFile(bool success, const std::string& data);
+ // Runs on FILE thread. Loads message bundles for the extension and
+ // localizes the CSS data. Calls back DidLoadAndLocalizeFile on the UI thread.
+ void LocalizeCSS(
+ const std::string& data,
+ const std::string& extension_id,
+ const FilePath& extension_path,
+ const std::string& extension_default_locale,
+ MessageLoop* origin_loop);
+
+ // Called when contents from the loaded file have been localized.
+ void DidLoadAndLocalizeFile(bool success, const std::string& data);
+
// Run in UI thread. Code string contains the code to be executed. Returns
// true on success. If true is returned, this does an AddRef.
bool Execute(const std::string& code_string);

Powered by Google App Engine
This is Rietveld 408576698