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

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

Issue 5582002: Move:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_browser_event_router.h" 5 #include "chrome/browser/extensions/extension_browser_event_router.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_event_names.h" 9 #include "chrome/browser/extensions/extension_event_names.h"
10 #include "chrome/browser/extensions/extension_event_router.h" 10 #include "chrome/browser/extensions/extension_event_router.h"
11 #include "chrome/browser/extensions/extension_page_actions_module_constants.h" 11 #include "chrome/browser/extensions/extension_page_actions_module_constants.h"
12 #include "chrome/browser/extensions/extension_tabs_module_constants.h" 12 #include "chrome/browser/extensions/extension_tabs_module_constants.h"
13 #include "chrome/browser/profile.h" 13 #include "chrome/browser/profile.h"
14 #include "chrome/browser/tab_contents/navigation_entry.h" 14 #include "chrome/browser/tab_contents/navigation_entry.h"
15 #include "chrome/browser/tab_contents/tab_contents.h" 15 #include "chrome/browser/tab_contents/tab_contents.h"
16 #include "chrome/browser/tab_contents_wrapper.h"
17 #include "chrome/browser/tab_contents_wrapper.h"
18 #include "chrome/browser/tabs/tab_strip_model.h" 16 #include "chrome/browser/tabs/tab_strip_model.h"
19 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
20 #include "chrome/common/extensions/extension_constants.h" 19 #include "chrome/common/extensions/extension_constants.h"
21 #include "chrome/common/extensions/extension.h" 20 #include "chrome/common/extensions/extension.h"
22 #include "chrome/common/notification_service.h" 21 #include "chrome/common/notification_service.h"
23 22
24 namespace events = extension_event_names; 23 namespace events = extension_event_names;
25 namespace tab_keys = extension_tabs_module_constants; 24 namespace tab_keys = extension_tabs_module_constants;
26 namespace page_action_keys = extension_page_actions_module_constants; 25 namespace page_action_keys = extension_page_actions_module_constants;
27 26
28 ExtensionBrowserEventRouter::TabEntry::TabEntry() 27 ExtensionBrowserEventRouter::TabEntry::TabEntry()
29 : complete_waiting_on_load_(false), 28 : complete_waiting_on_load_(false),
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 532
534 void ExtensionBrowserEventRouter::BrowserActionExecuted( 533 void ExtensionBrowserEventRouter::BrowserActionExecuted(
535 Profile* profile, const std::string& extension_id, Browser* browser) { 534 Profile* profile, const std::string& extension_id, Browser* browser) {
536 TabContentsWrapper* tab_contents = NULL; 535 TabContentsWrapper* tab_contents = NULL;
537 int tab_id = 0; 536 int tab_id = 0;
538 if (!ExtensionTabUtil::GetDefaultTab(browser, &tab_contents, &tab_id)) 537 if (!ExtensionTabUtil::GetDefaultTab(browser, &tab_contents, &tab_id))
539 return; 538 return;
540 DispatchEventWithTab(profile, extension_id, "browserAction.onClicked", 539 DispatchEventWithTab(profile, extension_id, "browserAction.onClicked",
541 tab_contents->tab_contents()); 540 tab_contents->tab_contents());
542 } 541 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/execute_code_in_tab_function.cc ('k') | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698