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

Side by Side Diff: extensions/browser/event_router.h

Issue 2898383002: [Extensions] Make Event::restrict_to_browser_context const. (Closed)
Patch Set: Created 3 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
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 #ifndef EXTENSIONS_BROWSER_EVENT_ROUTER_H_ 5 #ifndef EXTENSIONS_BROWSER_EVENT_ROUTER_H_
6 #define EXTENSIONS_BROWSER_EVENT_ROUTER_H_ 6 #define EXTENSIONS_BROWSER_EVENT_ROUTER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // correlates 1:1 with |event_name|, in some cases events will generate 356 // correlates 1:1 with |event_name|, in some cases events will generate
357 // their own names, but they cannot generate their own identifier. 357 // their own names, but they cannot generate their own identifier.
358 events::HistogramValue histogram_value; 358 events::HistogramValue histogram_value;
359 359
360 // The event to dispatch. 360 // The event to dispatch.
361 std::string event_name; 361 std::string event_name;
362 362
363 // Arguments to send to the event listener. 363 // Arguments to send to the event listener.
364 std::unique_ptr<base::ListValue> event_args; 364 std::unique_ptr<base::ListValue> event_args;
365 365
366 // If non-NULL, then the event will not be sent to other BrowserContexts 366 // If non-NULL, then the event will not be sent to other BrowserContexts
Devlin 2017/05/24 16:08:19 nit: s/NULL/null
lazyboy 2017/05/24 19:19:33 Done.
367 // unless the extension has permission (e.g. incognito tab update -> normal 367 // unless the extension has permission (e.g. incognito tab update -> normal
368 // tab only works if extension is allowed incognito access). 368 // tab only works if extension is allowed incognito access).
369 content::BrowserContext* restrict_to_browser_context; 369 content::BrowserContext* const restrict_to_browser_context;
370 370
371 // If not empty, the event is only sent to extensions with host permissions 371 // If not empty, the event is only sent to extensions with host permissions
372 // for this url. 372 // for this url.
373 GURL event_url; 373 GURL event_url;
374 374
375 // Whether a user gesture triggered the event. 375 // Whether a user gesture triggered the event.
376 EventRouter::UserGestureState user_gesture; 376 EventRouter::UserGestureState user_gesture;
377 377
378 // Extra information used to filter which events are sent to the listener. 378 // Extra information used to filter which events are sent to the listener.
379 EventFilteringInfo filter_info; 379 EventFilteringInfo filter_info;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 const std::string event_name; 422 const std::string event_name;
423 423
424 const std::string extension_id; 424 const std::string extension_id;
425 const GURL listener_url; 425 const GURL listener_url;
426 content::BrowserContext* browser_context; 426 content::BrowserContext* browser_context;
427 }; 427 };
428 428
429 } // namespace extensions 429 } // namespace extensions
430 430
431 #endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_ 431 #endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698