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

Side by Side Diff: chrome/browser/bookmarks/bookmark_manager_extension_api.cc

Issue 8949061: Move a bunch of methods from TabContents into the WebContents interface. This change either moves... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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) 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/bookmarks/bookmark_manager_extension_api.h" 5 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(1, &drop_index)); 417 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(1, &drop_index));
418 else 418 else
419 drop_index = drop_parent->child_count(); 419 drop_index = drop_parent->child_count();
420 420
421 if (render_view_host_->delegate()->GetRenderViewType() == 421 if (render_view_host_->delegate()->GetRenderViewType() ==
422 content::VIEW_TYPE_TAB_CONTENTS) { 422 content::VIEW_TYPE_TAB_CONTENTS) {
423 TabContents* tab_contents = 423 TabContents* tab_contents =
424 dispatcher()->delegate()->GetAssociatedTabContents(); 424 dispatcher()->delegate()->GetAssociatedTabContents();
425 CHECK(tab_contents); 425 CHECK(tab_contents);
426 ExtensionWebUI* web_ui = 426 ExtensionWebUI* web_ui =
427 static_cast<ExtensionWebUI*>(tab_contents->web_ui()); 427 static_cast<ExtensionWebUI*>(tab_contents->GetWebUI());
428 CHECK(web_ui); 428 CHECK(web_ui);
429 BookmarkManagerExtensionEventRouter* router = 429 BookmarkManagerExtensionEventRouter* router =
430 web_ui->bookmark_manager_extension_event_router(); 430 web_ui->bookmark_manager_extension_event_router();
431 431
432 DCHECK(router); 432 DCHECK(router);
433 const BookmarkNodeData* drag_data = router->GetBookmarkNodeData(); 433 const BookmarkNodeData* drag_data = router->GetBookmarkNodeData();
434 if (drag_data == NULL) { 434 if (drag_data == NULL) {
435 NOTREACHED() <<"Somehow we're dropping null bookmark data"; 435 NOTREACHED() <<"Somehow we're dropping null bookmark data";
436 return false; 436 return false;
437 } 437 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 bool CanEditBookmarkManagerFunction::RunImpl() { 484 bool CanEditBookmarkManagerFunction::RunImpl() {
485 result_.reset(Value::CreateBooleanValue( 485 result_.reset(Value::CreateBooleanValue(
486 profile_->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled))); 486 profile_->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled)));
487 return true; 487 return true;
488 } 488 }
489 489
490 bool RecordLaunchBookmarkFunction::RunImpl() { 490 bool RecordLaunchBookmarkFunction::RunImpl() {
491 bookmark_utils::RecordBookmarkLaunch(bookmark_utils::LAUNCH_MANAGER); 491 bookmark_utils::RecordBookmarkLaunch(bookmark_utils::LAUNCH_MANAGER);
492 return true; 492 return true;
493 } 493 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698