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

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc

Issue 10545115: TabContentsWrapper -> TabContents, part 41. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « no previous file | chrome/browser/ui/gtk/browser_actions_toolbar_gtk.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) 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/gtk/bookmarks/bookmark_bar_gtk.h" 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 gtk_widget_queue_draw(event_box_.get()); 683 gtk_widget_queue_draw(event_box_.get());
684 } 684 }
685 } 685 }
686 686
687 bool BookmarkBarGtk::GetTabContentsSize(gfx::Size* size) { 687 bool BookmarkBarGtk::GetTabContentsSize(gfx::Size* size) {
688 Browser* browser = browser_; 688 Browser* browser = browser_;
689 if (!browser) { 689 if (!browser) {
690 NOTREACHED(); 690 NOTREACHED();
691 return false; 691 return false;
692 } 692 }
693 WebContents* web_contents = browser->GetSelectedWebContents(); 693 WebContents* web_contents = browser->GetActiveWebContents();
694 if (!web_contents) { 694 if (!web_contents) {
695 // It is possible to have a browser but no WebContents while under testing, 695 // It is possible to have a browser but no WebContents while under testing,
696 // so don't NOTREACHED() and error the program. 696 // so don't NOTREACHED() and error the program.
697 return false; 697 return false;
698 } 698 }
699 if (!web_contents->GetView()) { 699 if (!web_contents->GetView()) {
700 NOTREACHED(); 700 NOTREACHED();
701 return false; 701 return false;
702 } 702 }
703 *size = web_contents->GetView()->GetContainerSize(); 703 *size = web_contents->GetView()->GetContainerSize();
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 void BookmarkBarGtk::OnEditBookmarksEnabledChanged() { 1456 void BookmarkBarGtk::OnEditBookmarksEnabledChanged() {
1457 GtkDestDefaults dest_defaults = 1457 GtkDestDefaults dest_defaults =
1458 *edit_bookmarks_enabled_ ? GTK_DEST_DEFAULT_ALL : 1458 *edit_bookmarks_enabled_ ? GTK_DEST_DEFAULT_ALL :
1459 GTK_DEST_DEFAULT_DROP; 1459 GTK_DEST_DEFAULT_DROP;
1460 gtk_drag_dest_set(overflow_button_, dest_defaults, NULL, 0, kDragAction); 1460 gtk_drag_dest_set(overflow_button_, dest_defaults, NULL, 0, kDragAction);
1461 gtk_drag_dest_set(other_bookmarks_button_, dest_defaults, 1461 gtk_drag_dest_set(other_bookmarks_button_, dest_defaults,
1462 NULL, 0, kDragAction); 1462 NULL, 0, kDragAction);
1463 ui::SetDestTargetList(overflow_button_, kDestTargetList); 1463 ui::SetDestTargetList(overflow_button_, kDestTargetList);
1464 ui::SetDestTargetList(other_bookmarks_button_, kDestTargetList); 1464 ui::SetDestTargetList(other_bookmarks_button_, kDestTargetList);
1465 } 1465 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698