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

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

Issue 7834048: Preliminary work to allow Chrome to build with USE_AURA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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) 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/ui/views/bookmarks/bookmark_bubble_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 Close(); 360 Close();
361 } 361 }
362 // WARNING: we've most likely been deleted when CloseWindow returns. 362 // WARNING: we've most likely been deleted when CloseWindow returns.
363 } 363 }
364 364
365 void BookmarkBubbleView::ShowEditor() { 365 void BookmarkBubbleView::ShowEditor() {
366 const BookmarkNode* node = 366 const BookmarkNode* node =
367 profile_->GetBookmarkModel()->GetMostRecentlyAddedNodeForURL(url_); 367 profile_->GetBookmarkModel()->GetMostRecentlyAddedNodeForURL(url_);
368 368
369 #if !defined(WEBUI_DIALOGS) 369 #if !defined(WEBUI_DIALOGS)
370 #if defined(OS_WIN) 370 #if defined(USE_AURA)
371 NOTIMPLEMENTED();
372 gfx::NativeView parent = NULL;
373 #elif defined(OS_WIN)
371 // Parent the editor to our root ancestor (not the root we're in, as that 374 // Parent the editor to our root ancestor (not the root we're in, as that
372 // is the info bubble and will close shortly). 375 // is the info bubble and will close shortly).
373 HWND parent = GetAncestor(GetWidget()->GetNativeView(), GA_ROOTOWNER); 376 HWND parent = GetAncestor(GetWidget()->GetNativeView(), GA_ROOTOWNER);
374 377
375 // We're about to show the bookmark editor. When the bookmark editor closes 378 // We're about to show the bookmark editor. When the bookmark editor closes
376 // we want the browser to become active. NativeWidgetWin::Hide() does a hide 379 // we want the browser to become active. NativeWidgetWin::Hide() does a hide
377 // in a such way that activation isn't changed, which means when we close 380 // in a such way that activation isn't changed, which means when we close
378 // Windows gets confused as to who it should give active status to. We 381 // Windows gets confused as to who it should give active status to. We
379 // explicitly hide the bookmark bubble window in such a way that activation 382 // explicitly hide the bookmark bubble window in such a way that activation
380 // status changes. That way, when the editor closes, activation is properly 383 // status changes. That way, when the editor closes, activation is properly
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 const BookmarkNode* new_parent = 426 const BookmarkNode* new_parent =
424 parent_model_.GetNodeAt(parent_combobox_->selected_item()); 427 parent_model_.GetNodeAt(parent_combobox_->selected_item());
425 if (new_parent != node->parent()) { 428 if (new_parent != node->parent()) {
426 UserMetrics::RecordAction( 429 UserMetrics::RecordAction(
427 UserMetricsAction("BookmarkBubble_ChangeParent")); 430 UserMetricsAction("BookmarkBubble_ChangeParent"));
428 model->Move(node, new_parent, new_parent->child_count()); 431 model->Move(node, new_parent, new_parent->child_count());
429 } 432 }
430 } 433 }
431 } 434 }
432 } 435 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_button.cc ('k') | chrome/browser/ui/views/browser_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698