| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 // RVH. There is sometimes a small gap between the pending RVH being deleted | 456 // RVH. There is sometimes a small gap between the pending RVH being deleted |
| 457 // and RenderViewCreated being called, so we update it here. | 457 // and RenderViewCreated being called, so we update it here. |
| 458 if (render_view_host == render_view_host_) | 458 if (render_view_host == render_view_host_) |
| 459 render_view_host_ = host_contents_->render_view_host(); | 459 render_view_host_ = host_contents_->render_view_host(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 content::JavaScriptDialogCreator* ExtensionHost::GetJavaScriptDialogCreator() { | 462 content::JavaScriptDialogCreator* ExtensionHost::GetJavaScriptDialogCreator() { |
| 463 return GetJavaScriptDialogCreatorInstance(); | 463 return GetJavaScriptDialogCreatorInstance(); |
| 464 } | 464 } |
| 465 | 465 |
| 466 void ExtensionHost::RunFileChooser(TabContents* tab, |
| 467 const content::FileChooserParams& params) { |
| 468 Browser::RunFileChooserHelper(tab, params); |
| 469 } |
| 470 |
| 466 void ExtensionHost::AddNewContents(TabContents* source, | 471 void ExtensionHost::AddNewContents(TabContents* source, |
| 467 TabContents* new_contents, | 472 TabContents* new_contents, |
| 468 WindowOpenDisposition disposition, | 473 WindowOpenDisposition disposition, |
| 469 const gfx::Rect& initial_pos, | 474 const gfx::Rect& initial_pos, |
| 470 bool user_gesture) { | 475 bool user_gesture) { |
| 471 // TODO(mpcomplete): is all this necessary? Maybe we can just call the | 476 // TODO(mpcomplete): is all this necessary? Maybe we can just call the |
| 472 // brower's delegate, and fall back to browser::Navigate if browser is NULL. | 477 // brower's delegate, and fall back to browser::Navigate if browser is NULL. |
| 473 TabContents* contents = new_contents; | 478 TabContents* contents = new_contents; |
| 474 if (!contents) | 479 if (!contents) |
| 475 return; | 480 return; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 browser->AddTabContents(contents, disposition, initial_pos, user_gesture); | 529 browser->AddTabContents(contents, disposition, initial_pos, user_gesture); |
| 525 } | 530 } |
| 526 | 531 |
| 527 | 532 |
| 528 void ExtensionHost::RenderViewReady() { | 533 void ExtensionHost::RenderViewReady() { |
| 529 content::NotificationService::current()->Notify( | 534 content::NotificationService::current()->Notify( |
| 530 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, | 535 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, |
| 531 content::Source<Profile>(profile_), | 536 content::Source<Profile>(profile_), |
| 532 content::Details<ExtensionHost>(this)); | 537 content::Details<ExtensionHost>(this)); |
| 533 } | 538 } |
| OLD | NEW |