OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/extensions/api/developer_private/inspectable_views_find
er.h" | 5 #include "chrome/browser/extensions/api/developer_private/inspectable_views_find
er.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_util.h" | 7 #include "chrome/browser/extensions/extension_util.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/common/extensions/api/developer_private.h" | 9 #include "chrome/common/extensions/api/developer_private.h" |
10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 view->render_view_id = render_frame_id; | 47 view->render_view_id = render_frame_id; |
48 view->incognito = incognito; | 48 view->incognito = incognito; |
49 view->is_iframe = is_iframe; | 49 view->is_iframe = is_iframe; |
50 switch (type) { | 50 switch (type) { |
51 case VIEW_TYPE_APP_WINDOW: | 51 case VIEW_TYPE_APP_WINDOW: |
52 view->type = api::developer_private::VIEW_TYPE_APP_WINDOW; | 52 view->type = api::developer_private::VIEW_TYPE_APP_WINDOW; |
53 break; | 53 break; |
54 case VIEW_TYPE_BACKGROUND_CONTENTS: | 54 case VIEW_TYPE_BACKGROUND_CONTENTS: |
55 view->type = api::developer_private::VIEW_TYPE_BACKGROUND_CONTENTS; | 55 view->type = api::developer_private::VIEW_TYPE_BACKGROUND_CONTENTS; |
56 break; | 56 break; |
| 57 case VIEW_TYPE_COMPONENT: |
| 58 view->type = api::developer_private::VIEW_TYPE_COMPONENT; |
| 59 break; |
57 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: | 60 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: |
58 view->type = api::developer_private::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; | 61 view->type = api::developer_private::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; |
59 break; | 62 break; |
60 case VIEW_TYPE_EXTENSION_DIALOG: | 63 case VIEW_TYPE_EXTENSION_DIALOG: |
61 view->type = api::developer_private::VIEW_TYPE_EXTENSION_DIALOG; | 64 view->type = api::developer_private::VIEW_TYPE_EXTENSION_DIALOG; |
62 break; | 65 break; |
63 case VIEW_TYPE_EXTENSION_GUEST: | 66 case VIEW_TYPE_EXTENSION_GUEST: |
64 view->type = api::developer_private::VIEW_TYPE_EXTENSION_GUEST; | 67 view->type = api::developer_private::VIEW_TYPE_EXTENSION_GUEST; |
65 break; | 68 break; |
66 case VIEW_TYPE_EXTENSION_POPUP: | 69 case VIEW_TYPE_EXTENSION_POPUP: |
67 view->type = api::developer_private::VIEW_TYPE_EXTENSION_POPUP; | 70 view->type = api::developer_private::VIEW_TYPE_EXTENSION_POPUP; |
68 break; | 71 break; |
69 case VIEW_TYPE_LAUNCHER_PAGE: | 72 case VIEW_TYPE_LAUNCHER_PAGE: |
70 view->type = api::developer_private::VIEW_TYPE_LAUNCHER_PAGE; | 73 view->type = api::developer_private::VIEW_TYPE_LAUNCHER_PAGE; |
71 break; | 74 break; |
72 case VIEW_TYPE_PANEL: | 75 case VIEW_TYPE_PANEL: |
73 view->type = api::developer_private::VIEW_TYPE_PANEL; | 76 view->type = api::developer_private::VIEW_TYPE_PANEL; |
74 break; | 77 break; |
75 case VIEW_TYPE_TAB_CONTENTS: | 78 case VIEW_TYPE_TAB_CONTENTS: |
76 view->type = api::developer_private::VIEW_TYPE_TAB_CONTENTS; | 79 view->type = api::developer_private::VIEW_TYPE_TAB_CONTENTS; |
77 break; | 80 break; |
78 case VIEW_TYPE_VIRTUAL_KEYBOARD: | |
79 view->type = api::developer_private::VIEW_TYPE_VIRTUAL_KEYBOARD; | |
80 break; | |
81 default: | 81 default: |
82 NOTREACHED(); | 82 NOTREACHED(); |
83 } | 83 } |
84 return view; | 84 return view; |
85 } | 85 } |
86 | 86 |
87 InspectableViewsFinder::ViewList InspectableViewsFinder::GetViewsForExtension( | 87 InspectableViewsFinder::ViewList InspectableViewsFinder::GetViewsForExtension( |
88 const Extension& extension, | 88 const Extension& extension, |
89 bool is_enabled) { | 89 bool is_enabled) { |
90 ViewList result; | 90 ViewList result; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 url = window->initial_url(); | 195 url = window->initial_url(); |
196 | 196 |
197 content::RenderProcessHost* process = web_contents->GetRenderProcessHost(); | 197 content::RenderProcessHost* process = web_contents->GetRenderProcessHost(); |
198 result->push_back(ConstructView( | 198 result->push_back(ConstructView( |
199 url, process->GetID(), web_contents->GetMainFrame()->GetRoutingID(), | 199 url, process->GetID(), web_contents->GetMainFrame()->GetRoutingID(), |
200 false, false, GetViewType(web_contents))); | 200 false, false, GetViewType(web_contents))); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 } // namespace extensions | 204 } // namespace extensions |
OLD | NEW |