Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #import "chrome/browser/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1490 | 1490 |
| 1491 // No need to |BuildMenu| here. It is done lazily upon menu access. | 1491 // No need to |BuildMenu| here. It is done lazily upon menu access. |
| 1492 [bookmarkItem setSubmenu:bookmarkMenuBridge_->BookmarkMenu()]; | 1492 [bookmarkItem setSubmenu:bookmarkMenuBridge_->BookmarkMenu()]; |
| 1493 [bookmarkItem setHidden:hidden]; | 1493 [bookmarkItem setHidden:hidden]; |
| 1494 | 1494 |
| 1495 historyMenuBridge_.reset(new HistoryMenuBridge(lastProfile_)); | 1495 historyMenuBridge_.reset(new HistoryMenuBridge(lastProfile_)); |
| 1496 historyMenuBridge_->BuildMenu(); | 1496 historyMenuBridge_->BuildMenu(); |
| 1497 | 1497 |
| 1498 chrome::BrowserCommandController:: | 1498 chrome::BrowserCommandController:: |
| 1499 UpdateSharedCommandsForIncognitoAvailability( | 1499 UpdateSharedCommandsForIncognitoAvailability( |
| 1500 menuState_.get(), lastProfile_); | 1500 menuState_.get(), lastProfile_, false); |
|
msw
2017/02/14 22:34:50
How do you know the relevant window is not fullscr
Hzj_jie
2017/02/15 02:00:49
AFAIK, menuState_ here is the state of menu items.
msw
2017/02/15 18:40:51
Sorry, but I don't understand how your reply answe
Hzj_jie
2017/02/15 21:20:16
No, I do not know, and I do not think we are talki
| |
| 1501 profilePrefRegistrar_.reset(new PrefChangeRegistrar()); | 1501 profilePrefRegistrar_.reset(new PrefChangeRegistrar()); |
| 1502 profilePrefRegistrar_->Init(lastProfile_->GetPrefs()); | 1502 profilePrefRegistrar_->Init(lastProfile_->GetPrefs()); |
| 1503 profilePrefRegistrar_->Add( | 1503 profilePrefRegistrar_->Add( |
| 1504 prefs::kIncognitoModeAvailability, | 1504 prefs::kIncognitoModeAvailability, |
| 1505 base::Bind(&chrome::BrowserCommandController:: | 1505 base::Bind(&chrome::BrowserCommandController:: |
| 1506 UpdateSharedCommandsForIncognitoAvailability, | 1506 UpdateSharedCommandsForIncognitoAvailability, |
| 1507 menuState_.get(), | 1507 menuState_.get(), |
| 1508 lastProfile_)); | 1508 lastProfile_, |
| 1509 false)); | |
| 1509 } | 1510 } |
| 1510 | 1511 |
| 1511 - (void)applicationDidChangeScreenParameters:(NSNotification*)notification { | 1512 - (void)applicationDidChangeScreenParameters:(NSNotification*)notification { |
| 1512 // During this callback the working area is not always already updated. Defer. | 1513 // During this callback the working area is not always already updated. Defer. |
| 1513 [self performSelector:@selector(delayedScreenParametersUpdate) | 1514 [self performSelector:@selector(delayedScreenParametersUpdate) |
| 1514 withObject:nil | 1515 withObject:nil |
| 1515 afterDelay:0]; | 1516 afterDelay:0]; |
| 1516 } | 1517 } |
| 1517 | 1518 |
| 1518 - (void)delayedScreenParametersUpdate { | 1519 - (void)delayedScreenParametersUpdate { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1607 | 1608 |
| 1608 //--------------------------------------------------------------------------- | 1609 //--------------------------------------------------------------------------- |
| 1609 | 1610 |
| 1610 namespace app_controller_mac { | 1611 namespace app_controller_mac { |
| 1611 | 1612 |
| 1612 bool IsOpeningNewWindow() { | 1613 bool IsOpeningNewWindow() { |
| 1613 return g_is_opening_new_window; | 1614 return g_is_opening_new_window; |
| 1614 } | 1615 } |
| 1615 | 1616 |
| 1616 } // namespace app_controller_mac | 1617 } // namespace app_controller_mac |
| OLD | NEW |