Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Summary
None of this stuff exists in D7 core. Several new classes and interfaces were added in this change to implement context-awareness for plugins:

\Drupal\Component\Plugin\Context\ContextInterface
\Drupal\Component\Plugin\Context\Context
\Drupal\Component\Plugin\ContextAwarePluginInterface
\Drupal\Component\Plugin\ContextAwarePluginBase
\Drupal\Core\Plugin\Context\Context
\Drupal\Core\Plugin\ContextAwarePluginBase

API Additions
Plugins that need to be context-aware (i.e., requiring a node or user or something similar in order to function) should either extend an implementation of ContextAwarePluginBase, or implement ContextAwarePluginInterface themselves. They also need to mention any contexts they use in their plugin definition. Here's an example (the only one in core, at the time of this writing) from core/modules/node/src/Plugin/Condition/NodeType.php:

use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
 * Provides a 'Node Type' condition.
 *
 * @Plugin(
 *   id = "node_type",
 *   label = @Translation("Node Bundle"),
 *   module = "node",
 *   context = {
 *     "node" = @ContextDefinition("entity:node", label = @Translation("Node"))
 *   }
 * )
 */

The contexts themselves are wrapped by an implementation of ContextInterface, which defines basic get/set/validate methods. ContextInterface's constructor expects a context definition array, which specifies the kind of data to be wrapped using the Typed Data API's syntax. Contexts don't care where their value comes from (URL? Passed directly? Some other way? It's up to you), only that it's the correct type.

As you can see, there are two versions of Context and two versions of ContextAwarePluginBase. The only difference between them is that the core version of Context supports the Typed Data API (the component version doesn't), and the core version of ContextAwarePluginBase uses the core version of Context.

Notes
When implementing context-aware plugins, the best practice is to build a base class for your plugin type that extends the core ContextAwarePluginBase.

Impacts: 
Module developers