OLD | NEW |
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 #include "chrome/renderer/extensions/schema_generated_bindings.h" | 5 #include "chrome/renderer/extensions/schema_generated_bindings.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 } else if (view_type_string == chrome::kViewTypeInfobar) { | 305 } else if (view_type_string == chrome::kViewTypeInfobar) { |
306 view_type = chrome::VIEW_TYPE_EXTENSION_INFOBAR; | 306 view_type = chrome::VIEW_TYPE_EXTENSION_INFOBAR; |
307 } else if (view_type_string == chrome::kViewTypeNotification) { | 307 } else if (view_type_string == chrome::kViewTypeNotification) { |
308 view_type = chrome::VIEW_TYPE_NOTIFICATION; | 308 view_type = chrome::VIEW_TYPE_NOTIFICATION; |
309 } else if (view_type_string == chrome::kViewTypeTabContents) { | 309 } else if (view_type_string == chrome::kViewTypeTabContents) { |
310 view_type = content::VIEW_TYPE_TAB_CONTENTS; | 310 view_type = content::VIEW_TYPE_TAB_CONTENTS; |
311 } else if (view_type_string == chrome::kViewTypePopup) { | 311 } else if (view_type_string == chrome::kViewTypePopup) { |
312 view_type = chrome::VIEW_TYPE_EXTENSION_POPUP; | 312 view_type = chrome::VIEW_TYPE_EXTENSION_POPUP; |
313 } else if (view_type_string == chrome::kViewTypeExtensionDialog) { | 313 } else if (view_type_string == chrome::kViewTypeExtensionDialog) { |
314 view_type = chrome::VIEW_TYPE_EXTENSION_DIALOG; | 314 view_type = chrome::VIEW_TYPE_EXTENSION_DIALOG; |
| 315 } else if (view_type_string == chrome::kViewTypeAppShell) { |
| 316 view_type = chrome::VIEW_TYPE_APP_SHELL; |
315 } else if (view_type_string != chrome::kViewTypeAll) { | 317 } else if (view_type_string != chrome::kViewTypeAll) { |
316 return v8::Undefined(); | 318 return v8::Undefined(); |
317 } | 319 } |
318 | 320 |
319 ExtensionImpl* v8_extension = GetFromArguments<ExtensionImpl>(args); | 321 ExtensionImpl* v8_extension = GetFromArguments<ExtensionImpl>(args); |
320 const ::Extension* extension = | 322 const ::Extension* extension = |
321 v8_extension->GetExtensionForCurrentRenderView(); | 323 v8_extension->GetExtensionForCurrentRenderView(); |
322 if (!extension) | 324 if (!extension) |
323 return v8::Undefined(); | 325 return v8::Undefined(); |
324 | 326 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 const std::string& extension_id) { | 751 const std::string& extension_id) { |
750 for (PendingRequestMap::const_iterator it = g_pending_requests.Get().begin(); | 752 for (PendingRequestMap::const_iterator it = g_pending_requests.Get().begin(); |
751 it != g_pending_requests.Get().end(); ++it) { | 753 it != g_pending_requests.Get().end(); ++it) { |
752 if (it->second->extension_id == extension_id) | 754 if (it->second->extension_id == extension_id) |
753 return true; | 755 return true; |
754 } | 756 } |
755 return false; | 757 return false; |
756 } | 758 } |
757 | 759 |
758 } // namespace | 760 } // namespace |
OLD | NEW |