OLD | NEW |
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/extension_context_menu_model.h" | 5 #include "chrome/browser/extensions/extension_context_menu_model.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/extensions/context_menu_matcher.h" | 10 #include "chrome/browser/extensions/context_menu_matcher.h" |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 break; | 448 break; |
449 default: | 449 default: |
450 NOTREACHED(); | 450 NOTREACHED(); |
451 } | 451 } |
452 | 452 |
453 if (command_id == PAGE_ACCESS_RUN_ON_SITE || | 453 if (command_id == PAGE_ACCESS_RUN_ON_SITE || |
454 command_id == PAGE_ACCESS_RUN_ON_ALL_SITES) { | 454 command_id == PAGE_ACCESS_RUN_ON_ALL_SITES) { |
455 ExtensionActionRunner* runner = | 455 ExtensionActionRunner* runner = |
456 ExtensionActionRunner::GetForWebContents(web_contents); | 456 ExtensionActionRunner::GetForWebContents(web_contents); |
457 if (runner && runner->WantsToRun(extension)) | 457 if (runner && runner->WantsToRun(extension)) |
458 runner->OnClicked(extension); | 458 runner->RunBlockedActions(extension); |
459 } | 459 } |
460 } | 460 } |
461 | 461 |
462 content::WebContents* ExtensionContextMenuModel::GetActiveWebContents() const { | 462 content::WebContents* ExtensionContextMenuModel::GetActiveWebContents() const { |
463 return browser_->tab_strip_model()->GetActiveWebContents(); | 463 return browser_->tab_strip_model()->GetActiveWebContents(); |
464 } | 464 } |
465 | 465 |
466 } // namespace extensions | 466 } // namespace extensions |
OLD | NEW |