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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc

Issue 10694060: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/bookmarks/bookmark_menu_delegate.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/bookmarks/bookmark_node_data.h" 9 #include "chrome/browser/bookmarks/bookmark_node_data.h"
10 #include "chrome/browser/bookmarks/bookmark_utils.h" 10 #include "chrome/browser/bookmarks/bookmark_utils.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 void BookmarkMenuDelegate::ExecuteCommand(int id, int mouse_event_flags) { 123 void BookmarkMenuDelegate::ExecuteCommand(int id, int mouse_event_flags) {
124 DCHECK(menu_id_to_node_map_.find(id) != menu_id_to_node_map_.end()); 124 DCHECK(menu_id_to_node_map_.find(id) != menu_id_to_node_map_.end());
125 125
126 const BookmarkNode* node = menu_id_to_node_map_[id]; 126 const BookmarkNode* node = menu_id_to_node_map_[id];
127 std::vector<const BookmarkNode*> selection; 127 std::vector<const BookmarkNode*> selection;
128 selection.push_back(node); 128 selection.push_back(node);
129 129
130 bookmark_utils::OpenAll(parent_->GetNativeWindow(), profile_, page_navigator_, 130 bookmark_utils::OpenAll(parent_->GetNativeWindow(), profile_, page_navigator_,
131 selection, browser::DispositionFromEventFlags(mouse_event_flags)); 131 selection, chrome::DispositionFromEventFlags(mouse_event_flags));
132 bookmark_utils::RecordBookmarkLaunch(location_); 132 bookmark_utils::RecordBookmarkLaunch(location_);
133 } 133 }
134 134
135 bool BookmarkMenuDelegate::GetDropFormats( 135 bool BookmarkMenuDelegate::GetDropFormats(
136 MenuItemView* menu, 136 MenuItemView* menu,
137 int* formats, 137 int* formats,
138 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { 138 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) {
139 *formats = ui::OSExchangeData::URL; 139 *formats = ui::OSExchangeData::URL;
140 custom_formats->insert(BookmarkNodeData::GetBookmarkCustomFormat()); 140 custom_formats->insert(BookmarkNodeData::GetBookmarkCustomFormat());
141 return true; 141 return true;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 MenuItemView* BookmarkMenuDelegate::GetMenuByID(int id) { 483 MenuItemView* BookmarkMenuDelegate::GetMenuByID(int id) {
484 for (NodeToMenuMap::const_iterator i(node_to_menu_map_.begin()); 484 for (NodeToMenuMap::const_iterator i(node_to_menu_map_.begin());
485 i != node_to_menu_map_.end(); ++i) { 485 i != node_to_menu_map_.end(); ++i) {
486 MenuItemView* menu = i->second->GetMenuItemByID(id); 486 MenuItemView* menu = i->second->GetMenuItemByID(id);
487 if (menu) 487 if (menu)
488 return menu; 488 return menu;
489 } 489 }
490 490
491 return parent_menu_item_ ? parent_menu_item_->GetMenuItemByID(id) : NULL; 491 return parent_menu_item_ ? parent_menu_item_->GetMenuItemByID(id) : NULL;
492 } 492 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | chrome/browser/ui/views/chrome_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698