| OLD | NEW |
| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // that this is a list of weak references. The |menu_item_map_| is the owner | 305 // that this is a list of weak references. The |menu_item_map_| is the owner |
| 306 // of all items. If it is not a window, then the entry is a single page and | 306 // of all items. If it is not a window, then the entry is a single page and |
| 307 // the vector will be empty. | 307 // the vector will be empty. |
| 308 std::vector<HistoryItem*> tabs; | 308 std::vector<HistoryItem*> tabs; |
| 309 | 309 |
| 310 private: | 310 private: |
| 311 DISALLOW_COPY_AND_ASSIGN(HistoryItem); | 311 DISALLOW_COPY_AND_ASSIGN(HistoryItem); |
| 312 }; | 312 }; |
| 313 | 313 |
| 314 GlobalMenuBarX11::GlobalMenuBarX11(BrowserView* browser_view, | 314 GlobalMenuBarX11::GlobalMenuBarX11(BrowserView* browser_view, |
| 315 BrowserDesktopWindowTreeHostX11* host) | 315 BrowserDesktopRootWindowHostX11* host) |
| 316 : browser_(browser_view->browser()), | 316 : browser_(browser_view->browser()), |
| 317 profile_(browser_->profile()), | 317 profile_(browser_->profile()), |
| 318 browser_view_(browser_view), | 318 browser_view_(browser_view), |
| 319 host_(host), | 319 host_(host), |
| 320 server_(NULL), | 320 server_(NULL), |
| 321 root_item_(NULL), | 321 root_item_(NULL), |
| 322 history_menu_(NULL), | 322 history_menu_(NULL), |
| 323 top_sites_(NULL), | 323 top_sites_(NULL), |
| 324 tab_restore_service_(NULL), | 324 tab_restore_service_(NULL), |
| 325 weak_ptr_factory_(this) { | 325 weak_ptr_factory_(this) { |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 tab_restore_service_->LoadTabsFromLastSession(); | 781 tab_restore_service_->LoadTabsFromLastSession(); |
| 782 tab_restore_service_->AddObserver(this); | 782 tab_restore_service_->AddObserver(this); |
| 783 | 783 |
| 784 // If LoadTabsFromLastSession doesn't load tabs, it won't call | 784 // If LoadTabsFromLastSession doesn't load tabs, it won't call |
| 785 // TabRestoreServiceChanged(). This ensures that all new windows after | 785 // TabRestoreServiceChanged(). This ensures that all new windows after |
| 786 // the first one will have their menus populated correctly. | 786 // the first one will have their menus populated correctly. |
| 787 TabRestoreServiceChanged(tab_restore_service_); | 787 TabRestoreServiceChanged(tab_restore_service_); |
| 788 } | 788 } |
| 789 } | 789 } |
| 790 } | 790 } |
| OLD | NEW |