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

Side by Side Diff: chrome/browser/ui/views/frame/global_menu_bar_x11.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame/global_menu_bar_x11.h" 5 #include "chrome/browser/ui/views/frame/global_menu_bar_x11.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <glib-object.h> 8 #include <glib-object.h>
9 9
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 if (item->session_id && service) { 764 if (item->session_id && service) {
765 service->RestoreEntryById(browser_->tab_restore_service_delegate(), 765 service->RestoreEntryById(browser_->tab_restore_service_delegate(),
766 item->session_id, browser_->host_desktop_type(), 766 item->session_id, browser_->host_desktop_type(),
767 UNKNOWN); 767 UNKNOWN);
768 } else { 768 } else {
769 DCHECK(item->url.is_valid()); 769 DCHECK(item->url.is_valid());
770 browser_->OpenURL(content::OpenURLParams( 770 browser_->OpenURL(content::OpenURLParams(
771 item->url, 771 item->url,
772 content::Referrer(), 772 content::Referrer(),
773 NEW_FOREGROUND_TAB, 773 NEW_FOREGROUND_TAB,
774 content::PAGE_TRANSITION_AUTO_BOOKMARK, 774 ui::PAGE_TRANSITION_AUTO_BOOKMARK,
775 false)); 775 false));
776 } 776 }
777 } 777 }
778 778
779 void GlobalMenuBarX11::OnHistoryMenuAboutToShow(DbusmenuMenuitem* item) { 779 void GlobalMenuBarX11::OnHistoryMenuAboutToShow(DbusmenuMenuitem* item) {
780 if (!tab_restore_service_) { 780 if (!tab_restore_service_) {
781 tab_restore_service_ = TabRestoreServiceFactory::GetForProfile(profile_); 781 tab_restore_service_ = TabRestoreServiceFactory::GetForProfile(profile_);
782 if (tab_restore_service_) { 782 if (tab_restore_service_) {
783 tab_restore_service_->LoadTabsFromLastSession(); 783 tab_restore_service_->LoadTabsFromLastSession();
784 tab_restore_service_->AddObserver(this); 784 tab_restore_service_->AddObserver(this);
785 785
786 // If LoadTabsFromLastSession doesn't load tabs, it won't call 786 // If LoadTabsFromLastSession doesn't load tabs, it won't call
787 // TabRestoreServiceChanged(). This ensures that all new windows after 787 // TabRestoreServiceChanged(). This ensures that all new windows after
788 // the first one will have their menus populated correctly. 788 // the first one will have their menus populated correctly.
789 TabRestoreServiceChanged(tab_restore_service_); 789 TabRestoreServiceChanged(tab_restore_service_);
790 } 790 }
791 } 791 }
792 } 792 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/find_bar_host_interactive_uitest.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698