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

Side by Side Diff: views/controls/menu/submenu_view.cc

Issue 6192007: Remove wstring from views. Part 3: Switch accessibility strings to string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « views/controls/menu/menu_item_view.cc ('k') | views/controls/progress_bar_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/controls/menu/submenu_view.h" 5 #include "views/controls/menu/submenu_view.h"
6 6
7 #include "gfx/canvas.h" 7 #include "gfx/canvas.h"
8 #include "views/controls/menu/menu_config.h" 8 #include "views/controls/menu/menu_config.h"
9 #include "views/controls/menu/menu_controller.h" 9 #include "views/controls/menu/menu_controller.h"
10 #include "views/controls/menu/menu_host.h" 10 #include "views/controls/menu/menu_host.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 return (drop_item_ == item && drop_position_ == MenuDelegate::DROP_ON); 305 return (drop_item_ == item && drop_position_ == MenuDelegate::DROP_ON);
306 } 306 }
307 307
308 MenuScrollViewContainer* SubmenuView::GetScrollViewContainer() { 308 MenuScrollViewContainer* SubmenuView::GetScrollViewContainer() {
309 if (!scroll_view_container_) { 309 if (!scroll_view_container_) {
310 scroll_view_container_ = new MenuScrollViewContainer(this); 310 scroll_view_container_ = new MenuScrollViewContainer(this);
311 // Otherwise MenuHost would delete us. 311 // Otherwise MenuHost would delete us.
312 scroll_view_container_->set_parent_owned(false); 312 scroll_view_container_->set_parent_owned(false);
313 313
314 // Use the parent menu item accessible name for the menu view. 314 // Use the parent menu item accessible name for the menu view.
315 std::wstring accessible_name; 315 string16 accessible_name;
316 GetMenuItem()->GetAccessibleName(&accessible_name); 316 GetMenuItem()->GetAccessibleName(&accessible_name);
317 scroll_view_container_->SetAccessibleName(accessible_name); 317 scroll_view_container_->SetAccessibleName(accessible_name);
318 SetAccessibleName(accessible_name); 318 SetAccessibleName(accessible_name);
319 } 319 }
320 return scroll_view_container_; 320 return scroll_view_container_;
321 } 321 }
322 322
323 gfx::NativeWindow SubmenuView::native_window() const { 323 gfx::NativeWindow SubmenuView::native_window() const {
324 return host_ ? host_->GetMenuHostWindow() : NULL; 324 return host_ ? host_->GetMenuHostWindow() : NULL;
325 } 325 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 item_bounds.set_height(kDropIndicatorHeight); 373 item_bounds.set_height(kDropIndicatorHeight);
374 return item_bounds; 374 return item_bounds;
375 375
376 default: 376 default:
377 // Don't render anything for on. 377 // Don't render anything for on.
378 return gfx::Rect(); 378 return gfx::Rect();
379 } 379 }
380 } 380 }
381 381
382 } // namespace views 382 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_item_view.cc ('k') | views/controls/progress_bar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698