1d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
2d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// found in the LICENSE file.
4d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
5d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)using System;
6d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)using System.Collections.Generic;
7d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)using System.Linq;
8d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)using System.Text;
9d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)using System.Threading.Tasks;
10d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
11d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)namespace ChromeDebug {
12d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  internal enum ProcessCategory {
13d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    Browser,
14d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    Renderer,
15d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    Gpu,
16d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    Plugin,
17d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    DelegateExecute,
18d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    MetroViewer,
19d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    Service,
20d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    Other
21d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  }
22d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
23d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // Defines an extension method for the ProcessCategory enum which converts the enum value into
24d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // the group title.
25d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  internal static class ProcessCategoryExtensions {
26d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    public static string ToGroupTitle(this ProcessCategory category) {
27d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      switch (category) {
28d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      case ProcessCategory.DelegateExecute:
29d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      return "Delegate Execute";
30d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      case ProcessCategory.MetroViewer:
31d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      return "Metro Viewer";
32d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      default:
33d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      return category.ToString();
34d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)      }
35d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)    }
36d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  }
37d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)}
38