OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/extension_host.h" | 5 #include "chrome/browser/extensions/extension_host.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, true, L""); | 339 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, true, L""); |
340 } | 340 } |
341 | 341 |
342 WebPreferences ExtensionHost::GetWebkitPrefs() { | 342 WebPreferences ExtensionHost::GetWebkitPrefs() { |
343 PrefService* prefs = render_view_host()->process()->profile()->GetPrefs(); | 343 PrefService* prefs = render_view_host()->process()->profile()->GetPrefs(); |
344 const bool kIsDomUI = true; | 344 const bool kIsDomUI = true; |
345 return RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, kIsDomUI); | 345 return RenderViewHostDelegateHelper::GetWebkitPrefs(prefs, kIsDomUI); |
346 } | 346 } |
347 | 347 |
348 void ExtensionHost::ProcessDOMUIMessage(const std::string& message, | 348 void ExtensionHost::ProcessDOMUIMessage(const std::string& message, |
349 const std::string& content, | 349 const Value* content, |
350 int request_id, | 350 int request_id, |
351 bool has_callback) { | 351 bool has_callback) { |
352 if (extension_function_dispatcher_.get()) { | 352 if (extension_function_dispatcher_.get()) { |
353 extension_function_dispatcher_->HandleRequest(message, content, request_id, | 353 extension_function_dispatcher_->HandleRequest(message, content, request_id, |
354 has_callback); | 354 has_callback); |
355 } | 355 } |
356 } | 356 } |
357 | 357 |
358 RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() { | 358 RenderViewHostDelegate::View* ExtensionHost::GetViewDelegate() { |
359 return this; | 359 return this; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 window_id = ExtensionTabUtil::GetWindowId( | 496 window_id = ExtensionTabUtil::GetWindowId( |
497 const_cast<ExtensionHost* >(this)->GetBrowser()); | 497 const_cast<ExtensionHost* >(this)->GetBrowser()); |
498 } else if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) { | 498 } else if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) { |
499 // Background page is not attached to any browser window, so pass -1. | 499 // Background page is not attached to any browser window, so pass -1. |
500 window_id = -1; | 500 window_id = -1; |
501 } else { | 501 } else { |
502 NOTREACHED(); | 502 NOTREACHED(); |
503 } | 503 } |
504 return window_id; | 504 return window_id; |
505 } | 505 } |
OLD | NEW |