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

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

Issue 7670041: Add --use-more-webui runtime flag to toggle WebUI replacements for native dialogs. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge with trunk. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 bookmarkBubbleController_ = nil; 1622 bookmarkBubbleController_ = nil;
1623 } 1623 }
1624 1624
1625 // Handle the editBookmarkNode: action sent from bookmark bubble controllers. 1625 // Handle the editBookmarkNode: action sent from bookmark bubble controllers.
1626 - (void)editBookmarkNode:(id)sender { 1626 - (void)editBookmarkNode:(id)sender {
1627 BOOL responds = [sender respondsToSelector:@selector(node)]; 1627 BOOL responds = [sender respondsToSelector:@selector(node)];
1628 DCHECK(responds); 1628 DCHECK(responds);
1629 if (responds) { 1629 if (responds) {
1630 const BookmarkNode* node = [sender node]; 1630 const BookmarkNode* node = [sender node];
1631 if (node) { 1631 if (node) {
1632 #if defined(WEBUI_DIALOGS)
1633 DCHECK(browser_);
1634 browser_->OpenBookmarkManagerEditNode(node->id());
1635 #else
1636 // A BookmarkEditorController is a sheet that owns itself, and 1632 // A BookmarkEditorController is a sheet that owns itself, and
1637 // deallocates itself when closed. 1633 // deallocates itself when closed.
1638 [[[BookmarkEditorController alloc] 1634 [[[BookmarkEditorController alloc]
1639 initWithParentWindow:[self window] 1635 initWithParentWindow:[self window]
1640 profile:browser_->profile() 1636 profile:browser_->profile()
1641 parent:node->parent() 1637 parent:node->parent()
1642 node:node 1638 node:node
1643 configuration:BookmarkEditor::SHOW_TREE] 1639 configuration:BookmarkEditor::SHOW_TREE]
1644 runAsModalSheet]; 1640 runAsModalSheet];
1645 #endif
1646 } 1641 }
1647 } 1642 }
1648 } 1643 }
1649 1644
1650 // If the browser is in incognito mode or has multi-profiles, install the image 1645 // If the browser is in incognito mode or has multi-profiles, install the image
1651 // view to decorate the window at the upper right. Use the same base y 1646 // view to decorate the window at the upper right. Use the same base y
1652 // coordinate as the tab strip. 1647 // coordinate as the tab strip.
1653 - (void)installAvatar { 1648 - (void)installAvatar {
1654 // Only install if this browser window is OTR and has a tab strip. 1649 // Only install if this browser window is OTR and has a tab strip.
1655 if (![self shouldShowAvatar]) 1650 if (![self shouldShowAvatar])
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 2157
2163 - (BOOL)supportsBookmarkBar { 2158 - (BOOL)supportsBookmarkBar {
2164 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2159 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2165 } 2160 }
2166 2161
2167 - (BOOL)isTabbedWindow { 2162 - (BOOL)isTabbedWindow {
2168 return browser_->is_type_tabbed(); 2163 return browser_->is_type_tabbed();
2169 } 2164 }
2170 2165
2171 @end // @implementation BrowserWindowController(WindowType) 2166 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698