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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 131093004: [DevTools] Update DevTools after bookmarks and infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 } 1579 }
1580 1580
1581 // TabStripControllerDelegate protocol. 1581 // TabStripControllerDelegate protocol.
1582 - (void)onActivateTabWithContents:(WebContents*)contents { 1582 - (void)onActivateTabWithContents:(WebContents*)contents {
1583 // Update various elements that are interested in knowing the current 1583 // Update various elements that are interested in knowing the current
1584 // WebContents. 1584 // WebContents.
1585 1585
1586 // Update all the UI bits. 1586 // Update all the UI bits.
1587 windowShim_->UpdateTitleBar(); 1587 windowShim_->UpdateTitleBar();
1588 1588
1589 [devToolsController_ updateDevToolsForWebContents:contents
1590 withProfile:browser_->profile()];
1591
1592 // Update the bookmark bar. 1589 // Update the bookmark bar.
1593 // Must do it after devtools updates, otherwise bookmark bar might
1594 // call resizeView -> layoutSubviews and cause unnecessary relayout.
1595 // TODO(viettrungluu): perhaps update to not terminate running animations (if 1590 // TODO(viettrungluu): perhaps update to not terminate running animations (if
1596 // applicable)? 1591 // applicable)?
1597 windowShim_->BookmarkBarStateChanged( 1592 windowShim_->BookmarkBarStateChanged(
1598 BookmarkBar::DONT_ANIMATE_STATE_CHANGE); 1593 BookmarkBar::DONT_ANIMATE_STATE_CHANGE);
1599 1594
1600 [infoBarContainerController_ changeWebContents:contents]; 1595 [infoBarContainerController_ changeWebContents:contents];
1601 1596
1597 // Must do this after bookmark and infobar updates to avoid
1598 // unnecesary resize in contents.
1599 [devToolsController_ updateDevToolsForWebContents:contents
1600 withProfile:browser_->profile()];
1601
1602 [self updateAllowOverlappingViews:[self inPresentationMode]]; 1602 [self updateAllowOverlappingViews:[self inPresentationMode]];
1603 } 1603 }
1604 1604
1605 - (void)onTabChanged:(TabStripModelObserver::TabChangeType)change 1605 - (void)onTabChanged:(TabStripModelObserver::TabChangeType)change
1606 withContents:(WebContents*)contents { 1606 withContents:(WebContents*)contents {
1607 // Update titles if this is the currently selected tab and if it isn't just 1607 // Update titles if this is the currently selected tab and if it isn't just
1608 // the loading state which changed. 1608 // the loading state which changed.
1609 if (change != TabStripModelObserver::LOADING_ONLY) 1609 if (change != TabStripModelObserver::LOADING_ONLY)
1610 windowShim_->UpdateTitleBar(); 1610 windowShim_->UpdateTitleBar();
1611 1611
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 2228
2229 - (BOOL)supportsBookmarkBar { 2229 - (BOOL)supportsBookmarkBar {
2230 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2230 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2231 } 2231 }
2232 2232
2233 - (BOOL)isTabbedWindow { 2233 - (BOOL)isTabbedWindow {
2234 return browser_->is_type_tabbed(); 2234 return browser_->is_type_tabbed();
2235 } 2235 }
2236 2236
2237 @end // @implementation BrowserWindowController(WindowType) 2237 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698