Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Unified Diff: chrome/browser/extensions/extension_dom_ui.cc

Issue 3161037: Remove attempt to be smart about where to open navigations (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: wherps Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_dom_ui.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_dom_ui.cc
diff --git a/chrome/browser/extensions/extension_dom_ui.cc b/chrome/browser/extensions/extension_dom_ui.cc
index 598e43bf5da13358a9f65af0d0cf8d631785ba98..a91933f79afc65bea14f1e53c91a2cd8e0e99830 100644
--- a/chrome/browser/extensions/extension_dom_ui.cc
+++ b/chrome/browser/extensions/extension_dom_ui.cc
@@ -22,6 +22,7 @@
#include "chrome/common/bindings_policy.h"
#include "chrome/common/page_transition_types.h"
#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/url_constants.h"
#include "gfx/codec/png_codec.h"
@@ -143,13 +144,14 @@ void ExtensionDOMUI::ResetExtensionFunctionDispatcher(
}
void ExtensionDOMUI::ResetExtensionBookmarkManagerEventRouter() {
- extension_bookmark_manager_event_router_.reset(
- new ExtensionBookmarkManagerEventRouter(GetProfile(), tab_contents()));
- // We set the link transition type to AUTO_BOOKMARK for the bookmark manager.
- // This doesn't really belong here, but neither does this function.
- // ExtensionDOMUI could potentially be used for extensions besides the
- // bookmark manager, but currently it does not.
- link_transition_type_ = PageTransition::AUTO_BOOKMARK;
+ // Hack: A few things we specialize just for the bookmark manager.
+ if (extension_function_dispatcher_->extension_id() ==
+ extension_misc::kBookmarkManagerId) {
+ extension_bookmark_manager_event_router_.reset(
+ new ExtensionBookmarkManagerEventRouter(GetProfile(), tab_contents()));
+
+ link_transition_type_ = PageTransition::AUTO_BOOKMARK;
+ }
}
void ExtensionDOMUI::RenderViewCreated(RenderViewHost* render_view_host) {
« no previous file with comments | « chrome/browser/extensions/extension_dom_ui.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698