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/dispatcher.h" | 5 #include "chrome/renderer/extensions/dispatcher.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 return false; | 164 return false; |
165 | 165 |
166 ExtensionHelper* helper = ExtensionHelper::Get(render_view); | 166 ExtensionHelper* helper = ExtensionHelper::Get(render_view); |
167 return (extension && extension->has_lazy_background_page() && | 167 return (extension && extension->has_lazy_background_page() && |
168 helper->view_type() == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); | 168 helper->view_type() == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); |
169 } | 169 } |
170 }; | 170 }; |
171 | 171 |
172 class ProcessInfoNativeHandler : public ChromeV8Extension { | 172 class ProcessInfoNativeHandler : public ChromeV8Extension { |
173 public: | 173 public: |
174 explicit ProcessInfoNativeHandler( | 174 ProcessInfoNativeHandler( |
175 Dispatcher* dispatcher, | 175 Dispatcher* dispatcher, |
176 const std::string& extension_id, | 176 const std::string& extension_id, |
177 const std::string& context_type, | 177 const std::string& context_type, |
178 bool is_incognito_context, | 178 bool is_incognito_context, |
179 int manifest_version, | 179 int manifest_version, |
180 bool send_request_disabled) | 180 bool send_request_disabled) |
181 : ChromeV8Extension(dispatcher), | 181 : ChromeV8Extension(dispatcher), |
182 extension_id_(extension_id), | 182 extension_id_(extension_id), |
183 context_type_(context_type), | 183 context_type_(context_type), |
184 is_incognito_context_(is_incognito_context), | 184 is_incognito_context_(is_incognito_context), |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 std::string error_msg = base::StringPrintf(kMessage, function_name.c_str()); | 1130 std::string error_msg = base::StringPrintf(kMessage, function_name.c_str()); |
1131 v8::ThrowException( | 1131 v8::ThrowException( |
1132 v8::Exception::Error(v8::String::New(error_msg.c_str()))); | 1132 v8::Exception::Error(v8::String::New(error_msg.c_str()))); |
1133 return false; | 1133 return false; |
1134 } | 1134 } |
1135 | 1135 |
1136 return true; | 1136 return true; |
1137 } | 1137 } |
1138 | 1138 |
1139 } // namespace extensions | 1139 } // namespace extensions |
OLD | NEW |