diff options
Diffstat (limited to 'chrome/browser/extensions/extension_bookmark_manager_api.cc')
-rw-r--r-- | chrome/browser/extensions/extension_bookmark_manager_api.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_bookmark_manager_api.cc b/chrome/browser/extensions/extension_bookmark_manager_api.cc index 6f23fe8..6d89d373 100644 --- a/chrome/browser/extensions/extension_bookmark_manager_api.cc +++ b/chrome/browser/extensions/extension_bookmark_manager_api.cc @@ -365,12 +365,13 @@ bool StartDragBookmarkManagerFunction::RunImpl() { EXTENSION_FUNCTION_VALIDATE( GetNodesFromArguments(model, args_.get(), 0, &nodes)); - if (dispatcher()->render_view_host()->delegate()->GetRenderViewType() == + if (render_view_host_->delegate()->GetRenderViewType() == ViewType::TAB_CONTENTS) { - ExtensionWebUI* web_ui = - static_cast<ExtensionWebUI*>(dispatcher()->delegate()); - bookmark_utils::DragBookmarks( - profile(), nodes, web_ui->tab_contents()->GetNativeView()); + TabContents* tab_contents = + dispatcher()->delegate()->GetAssociatedTabContents(); + CHECK(tab_contents); + bookmark_utils::DragBookmarks(profile(), nodes, + tab_contents->GetNativeView()); return true; } else { @@ -406,10 +407,14 @@ bool DropBookmarkManagerFunction::RunImpl() { else drop_index = drop_parent->child_count(); - if (dispatcher()->render_view_host()->delegate()->GetRenderViewType() == + if (render_view_host_->delegate()->GetRenderViewType() == ViewType::TAB_CONTENTS) { + TabContents* tab_contents = + dispatcher()->delegate()->GetAssociatedTabContents(); + CHECK(tab_contents); ExtensionWebUI* web_ui = - static_cast<ExtensionWebUI*>(dispatcher()->delegate()); + static_cast<ExtensionWebUI*>(tab_contents->web_ui()); + CHECK(web_ui); ExtensionBookmarkManagerEventRouter* router = web_ui->extension_bookmark_manager_event_router(); |