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/extension_custom_bindings.h" | 5 #include "chrome/renderer/extensions/extension_custom_bindings.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/common/chrome_view_type.h" | 10 #include "chrome/common/chrome_view_type.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // |view_type| == content::VIEW_TYPE_INVALID means getting any type of | 132 // |view_type| == content::VIEW_TYPE_INVALID means getting any type of |
133 // views. | 133 // views. |
134 content::ViewType view_type = content::VIEW_TYPE_INVALID; | 134 content::ViewType view_type = content::VIEW_TYPE_INVALID; |
135 if (view_type_string == chrome::kViewTypeBackgroundPage) { | 135 if (view_type_string == chrome::kViewTypeBackgroundPage) { |
136 view_type = chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; | 136 view_type = chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; |
137 } else if (view_type_string == chrome::kViewTypeInfobar) { | 137 } else if (view_type_string == chrome::kViewTypeInfobar) { |
138 view_type = chrome::VIEW_TYPE_EXTENSION_INFOBAR; | 138 view_type = chrome::VIEW_TYPE_EXTENSION_INFOBAR; |
139 } else if (view_type_string == chrome::kViewTypeNotification) { | 139 } else if (view_type_string == chrome::kViewTypeNotification) { |
140 view_type = chrome::VIEW_TYPE_NOTIFICATION; | 140 view_type = chrome::VIEW_TYPE_NOTIFICATION; |
141 } else if (view_type_string == chrome::kViewTypeTabContents) { | 141 } else if (view_type_string == chrome::kViewTypeTabContents) { |
142 view_type = content::VIEW_TYPE_TAB_CONTENTS; | 142 view_type = content::VIEW_TYPE_WEB_CONTENTS; |
143 } else if (view_type_string == chrome::kViewTypePopup) { | 143 } else if (view_type_string == chrome::kViewTypePopup) { |
144 view_type = chrome::VIEW_TYPE_EXTENSION_POPUP; | 144 view_type = chrome::VIEW_TYPE_EXTENSION_POPUP; |
145 } else if (view_type_string == chrome::kViewTypeExtensionDialog) { | 145 } else if (view_type_string == chrome::kViewTypeExtensionDialog) { |
146 view_type = chrome::VIEW_TYPE_EXTENSION_DIALOG; | 146 view_type = chrome::VIEW_TYPE_EXTENSION_DIALOG; |
147 } else if (view_type_string == chrome::kViewTypeAppShell) { | 147 } else if (view_type_string == chrome::kViewTypeAppShell) { |
148 view_type = chrome::VIEW_TYPE_APP_SHELL; | 148 view_type = chrome::VIEW_TYPE_APP_SHELL; |
149 } else if (view_type_string == chrome::kViewTypePanel) { | 149 } else if (view_type_string == chrome::kViewTypePanel) { |
150 view_type = chrome::VIEW_TYPE_PANEL; | 150 view_type = chrome::VIEW_TYPE_PANEL; |
151 } else if (view_type_string != chrome::kViewTypeAll) { | 151 } else if (view_type_string != chrome::kViewTypeAll) { |
152 return v8::Undefined(); | 152 return v8::Undefined(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 renderview->Send(new ExtensionHostMsg_OpenChannelToExtension( | 187 renderview->Send(new ExtensionHostMsg_OpenChannelToExtension( |
188 renderview->GetRoutingID(), | 188 renderview->GetRoutingID(), |
189 source_id, | 189 source_id, |
190 target_id, | 190 target_id, |
191 channel_name, | 191 channel_name, |
192 &port_id)); | 192 &port_id)); |
193 return v8::Integer::New(port_id); | 193 return v8::Integer::New(port_id); |
194 } | 194 } |
195 | 195 |
196 } // namespace extensions | 196 } // namespace extensions |
OLD | NEW |