How does Drupal determine the context in which to display the admin theme? One of the great things about Drupal 7 is the inclusion of an admin theme, Seven. But how does Drupal determine whether to display the administration theme, or to display the site's theme? 

Is it path-based (i.e., everything under admin), or something else?
There is now a hook for this: hook_admin_paths(). As usual, the default configuration is in system_admin_paths() but there are many other implementations in core, search for _admin_paths.