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

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

Issue 10696208: Move ExtensionEventRouter and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed bug + latest master Created 8 years, 5 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
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/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/browser/browser_shutdown.h" 16 #include "chrome/browser/browser_shutdown.h"
17 #include "chrome/browser/extensions/extension_event_router.h" 17 #include "chrome/browser/extensions/event_router.h"
18 #include "chrome/browser/extensions/extension_process_manager.h" 18 #include "chrome/browser/extensions/extension_process_manager.h"
19 #include "chrome/browser/extensions/extension_service.h" 19 #include "chrome/browser/extensions/extension_service.h"
20 #include "chrome/browser/extensions/extension_system.h" 20 #include "chrome/browser/extensions/extension_system.h"
21 #include "chrome/browser/extensions/extension_tab_util.h" 21 #include "chrome/browser/extensions/extension_tab_util.h"
22 #include "chrome/browser/extensions/window_controller.h" 22 #include "chrome/browser/extensions/window_controller.h"
23 #include "chrome/browser/file_select_helper.h" 23 #include "chrome/browser/file_select_helper.h"
24 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h" 25 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
26 #include "chrome/browser/ui/browser.h" 26 #include "chrome/browser/ui/browser.h"
27 #include "chrome/browser/ui/browser_finder.h" 27 #include "chrome/browser/ui/browser_finder.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 IPC_MESSAGE_UNHANDLED(handled = false) 495 IPC_MESSAGE_UNHANDLED(handled = false)
496 IPC_END_MESSAGE_MAP() 496 IPC_END_MESSAGE_MAP()
497 return handled; 497 return handled;
498 } 498 }
499 499
500 void ExtensionHost::OnRequest(const ExtensionHostMsg_Request_Params& params) { 500 void ExtensionHost::OnRequest(const ExtensionHostMsg_Request_Params& params) {
501 extension_function_dispatcher_.Dispatch(params, render_view_host()); 501 extension_function_dispatcher_.Dispatch(params, render_view_host());
502 } 502 }
503 503
504 void ExtensionHost::OnEventAck() { 504 void ExtensionHost::OnEventAck() {
505 ExtensionEventRouter* router = ExtensionSystem::Get(profile_)->event_router(); 505 extensions::EventRouter* router =
506 ExtensionSystem::Get(profile_)->event_router();
506 if (router) 507 if (router)
507 router->OnEventAck(profile_, extension_id()); 508 router->OnEventAck(profile_, extension_id());
508 } 509 }
509 510
510 void ExtensionHost::OnIncrementLazyKeepaliveCount() { 511 void ExtensionHost::OnIncrementLazyKeepaliveCount() {
511 ExtensionProcessManager* pm = 512 ExtensionProcessManager* pm =
512 ExtensionSystem::Get(profile_)->process_manager(); 513 ExtensionSystem::Get(profile_)->process_manager();
513 if (pm) 514 if (pm)
514 pm->IncrementLazyKeepaliveCount(extension()); 515 pm->IncrementLazyKeepaliveCount(extension());
515 } 516 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 ExtensionTabUtil::CreateTab(new_contents, extension_id_, disposition, 592 ExtensionTabUtil::CreateTab(new_contents, extension_id_, disposition,
592 initial_pos, user_gesture); 593 initial_pos, user_gesture);
593 } 594 }
594 595
595 void ExtensionHost::RenderViewReady() { 596 void ExtensionHost::RenderViewReady() {
596 content::NotificationService::current()->Notify( 597 content::NotificationService::current()->Notify(
597 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 598 chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
598 content::Source<Profile>(profile_), 599 content::Source<Profile>(profile_),
599 content::Details<ExtensionHost>(this)); 600 content::Details<ExtensionHost>(this));
600 } 601 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_font_settings_api.cc ('k') | chrome/browser/extensions/extension_idle_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698