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

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 823703004: Tracking push events for lucid sleep (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Version 2 with NotificationService Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/dispatcher.h" 5 #include "extensions/renderer/dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 495
496 // Tell the browser process when an event has been dispatched with a lazy 496 // Tell the browser process when an event has been dispatched with a lazy
497 // background page active. 497 // background page active.
498 const Extension* extension = extensions_.GetByID(extension_id); 498 const Extension* extension = extensions_.GetByID(extension_id);
499 if (extension && BackgroundInfo::HasLazyBackgroundPage(extension) && 499 if (extension && BackgroundInfo::HasLazyBackgroundPage(extension) &&
500 module_name == kEventBindings && 500 module_name == kEventBindings &&
501 function_name == kEventDispatchFunction) { 501 function_name == kEventDispatchFunction) {
502 RenderView* background_view = 502 RenderView* background_view =
503 ExtensionHelper::GetBackgroundPage(extension_id); 503 ExtensionHelper::GetBackgroundPage(extension_id);
504 if (background_view) { 504 if (background_view) {
505 int message_id;
506 args.GetInteger(3, &message_id);
505 background_view->Send( 507 background_view->Send(
506 new ExtensionHostMsg_EventAck(background_view->GetRoutingID())); 508 new ExtensionHostMsg_EventAck(background_view->GetRoutingID(),
509 message_id));
507 } 510 }
508 } 511 }
509 } 512 }
510 513
511 void Dispatcher::ClearPortData(int port_id) { 514 void Dispatcher::ClearPortData(int port_id) {
512 // Only the target port side has entries in |port_to_tab_id_map_|. If 515 // Only the target port side has entries in |port_to_tab_id_map_|. If
513 // |port_id| is a source port, std::map::erase() will just silently fail 516 // |port_id| is a source port, std::map::erase() will just silently fail
514 // here as a no-op. 517 // here as a no-op.
515 port_to_tab_id_map_.erase(port_id); 518 port_to_tab_id_map_.erase(port_id);
516 } 519 }
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 return v8::Handle<v8::Object>(); 1418 return v8::Handle<v8::Object>();
1416 1419
1417 if (bind_name) 1420 if (bind_name)
1418 *bind_name = split.back(); 1421 *bind_name = split.back();
1419 1422
1420 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) 1423 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context))
1421 : bind_object; 1424 : bind_object;
1422 } 1425 }
1423 1426
1424 } // namespace extensions 1427 } // namespace extensions
OLDNEW
« extensions/browser/notification_types.h ('K') | « extensions/common/extension_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698