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

Side by Side Diff: chrome/browser/extensions/script_badge_controller.cc

Issue 10443105: Take 2 at implementing activeTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: empty -> is_empty Created 8 years, 6 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/browser/extensions/script_badge_controller.h" 5 #include "chrome/browser/extensions/script_badge_controller.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 extension_id, 82 extension_id,
83 callback); 83 callback);
84 84
85 script_executor_.ExecuteScript(extension_id, 85 script_executor_.ExecuteScript(extension_id,
86 script_type, 86 script_type,
87 code, 87 code,
88 frame_scope, 88 frame_scope,
89 run_at, 89 run_at,
90 world_type, 90 world_type,
91 this_callback); 91 this_callback);
92
93 } 92 }
94 93
95 void ScriptBadgeController::OnExecuteScriptFinished( 94 void ScriptBadgeController::OnExecuteScriptFinished(
96 const std::string& extension_id, 95 const std::string& extension_id,
97 const ExecuteScriptCallback& callback, 96 const ExecuteScriptCallback& callback,
98 bool success, 97 bool success,
99 int32 page_id, 98 int32 page_id,
100 const std::string& error) { 99 const std::string& error) {
101 if (success && page_id == GetPageID()) { 100 if (success && page_id == GetPageID()) {
102 extensions_executing_scripts_.insert(extension_id); 101 extensions_executing_scripts_.insert(extension_id);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (page_id == GetPageID()) { 142 if (page_id == GetPageID()) {
144 size_t original_size = extensions_executing_scripts_.size(); 143 size_t original_size = extensions_executing_scripts_.size();
145 extensions_executing_scripts_.insert(extension_ids.begin(), 144 extensions_executing_scripts_.insert(extension_ids.begin(),
146 extension_ids.end()); 145 extension_ids.end());
147 if (extensions_executing_scripts_.size() > original_size) 146 if (extensions_executing_scripts_.size() > original_size)
148 Notify(); 147 Notify();
149 } 148 }
150 } 149 }
151 150
152 } // namespace extensions 151 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698