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

Side by Side Diff: chrome/browser/extensions/extension_dom_ui.cc

Issue 661019: Add command line option to use a tabbed bookmark manager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_dom_ui.h" 5 #include "chrome/browser/extensions/extension_dom_ui.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/browser_list.h" 9 #include "chrome/browser/browser_list.h"
10 #include "chrome/browser/extensions/extension_bookmark_manager_api.h" 10 #include "chrome/browser/extensions/extension_bookmark_manager_api.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Use the NavigationController to get the URL rather than the TabContents 45 // Use the NavigationController to get the URL rather than the TabContents
46 // since this is the real underlying URL (see HandleChromeURLOverride). 46 // since this is the real underlying URL (see HandleChromeURLOverride).
47 NavigationController& controller = tab_contents()->controller(); 47 NavigationController& controller = tab_contents()->controller();
48 const GURL& url = controller.GetActiveEntry()->url(); 48 const GURL& url = controller.GetActiveEntry()->url();
49 extension_function_dispatcher_.reset( 49 extension_function_dispatcher_.reset(
50 new ExtensionFunctionDispatcher(render_view_host, this, url)); 50 new ExtensionFunctionDispatcher(render_view_host, this, url));
51 } 51 }
52 52
53 void ExtensionDOMUI::ResetExtensionBookmarkManagerEventRouter() { 53 void ExtensionDOMUI::ResetExtensionBookmarkManagerEventRouter() {
54 if (CommandLine::ForCurrentProcess()->HasSwitch( 54 if (CommandLine::ForCurrentProcess()->HasSwitch(
55 switches::kEnableExperimentalExtensionApis)) { 55 switches::kEnableTabbedBookmarkManager)) {
56 extension_bookmark_manager_event_router_.reset( 56 extension_bookmark_manager_event_router_.reset(
57 new ExtensionBookmarkManagerEventRouter(GetProfile(), tab_contents())); 57 new ExtensionBookmarkManagerEventRouter(GetProfile(), tab_contents()));
58 } 58 }
59 } 59 }
60 60
61 void ExtensionDOMUI::RenderViewCreated(RenderViewHost* render_view_host) { 61 void ExtensionDOMUI::RenderViewCreated(RenderViewHost* render_view_host) {
62 ResetExtensionFunctionDispatcher(render_view_host); 62 ResetExtensionFunctionDispatcher(render_view_host);
63 ResetExtensionBookmarkManagerEventRouter(); 63 ResetExtensionBookmarkManagerEventRouter();
64 } 64 }
65 65
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // If it's being unregistered, it should already be in the list. 287 // If it's being unregistered, it should already be in the list.
288 NOTREACHED(); 288 NOTREACHED();
289 continue; 289 continue;
290 } else { 290 } else {
291 StringValue override((*iter).second.spec()); 291 StringValue override((*iter).second.spec());
292 UnregisterAndReplaceOverride((*iter).first, profile, 292 UnregisterAndReplaceOverride((*iter).first, profile,
293 page_overrides, &override); 293 page_overrides, &override);
294 } 294 }
295 } 295 }
296 } 296 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_dom_ui.h ('k') | chrome/browser/resources/bookmark_manager/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698