| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 // TODO(erikkay): These two lines could be refactored with TabContentsView. | 570 // TODO(erikkay): These two lines could be refactored with TabContentsView. |
| 571 widget_host_view->InitAsPopup(render_view_host()->view(), initial_pos); | 571 widget_host_view->InitAsPopup(render_view_host()->view(), initial_pos); |
| 572 widget_host_view->GetRenderWidgetHost()->Init(); | 572 widget_host_view->GetRenderWidgetHost()->Init(); |
| 573 } | 573 } |
| 574 | 574 |
| 575 void ExtensionHost::ShowContextMenu(const ContextMenuParams& params) { | 575 void ExtensionHost::ShowContextMenu(const ContextMenuParams& params) { |
| 576 // TODO(erikkay) Show a default context menu. | 576 // TODO(erikkay) Show a default context menu. |
| 577 } | 577 } |
| 578 | 578 |
| 579 void ExtensionHost::StartDragging(const WebDropData& drop_data, | 579 void ExtensionHost::StartDragging(const WebDropData& drop_data, |
| 580 WebDragOperationsMask operation_mask) { | 580 WebDragOperationsMask operation_mask, |
| 581 const SkBitmap& image, |
| 582 const gfx::Point& image_offset) { |
| 581 // We're not going to do any drag & drop, but we have to tell the renderer the | 583 // We're not going to do any drag & drop, but we have to tell the renderer the |
| 582 // drag & drop ended, othewise the renderer thinks the drag operation is | 584 // drag & drop ended, othewise the renderer thinks the drag operation is |
| 583 // underway and mouse events won't work. See bug 34061. | 585 // underway and mouse events won't work. See bug 34061. |
| 584 // TODO(twiz) Implement drag & drop support for ExtensionHost instances. | 586 // TODO(twiz) Implement drag & drop support for ExtensionHost instances. |
| 585 // See feature issue 36288. | 587 // See feature issue 36288. |
| 586 render_view_host()->DragSourceSystemDragEnded(); | 588 render_view_host()->DragSourceSystemDragEnded(); |
| 587 } | 589 } |
| 588 | 590 |
| 589 void ExtensionHost::UpdateDragCursor(WebDragOperation operation) { | 591 void ExtensionHost::UpdateDragCursor(WebDragOperation operation) { |
| 590 } | 592 } |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 // Extensions hosted in ExternalTabContainer objects may not have | 724 // Extensions hosted in ExternalTabContainer objects may not have |
| 723 // an associated browser. | 725 // an associated browser. |
| 724 Browser* browser = GetBrowser(); | 726 Browser* browser = GetBrowser(); |
| 725 if (browser) | 727 if (browser) |
| 726 window_id = ExtensionTabUtil::GetWindowId(browser); | 728 window_id = ExtensionTabUtil::GetWindowId(browser); |
| 727 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { | 729 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { |
| 728 NOTREACHED(); | 730 NOTREACHED(); |
| 729 } | 731 } |
| 730 return window_id; | 732 return window_id; |
| 731 } | 733 } |
| OLD | NEW |