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

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

Issue 8314017: Fix minor WebUI dialog issues, mostly with bookmark management (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks from flackr CR Created 9 years, 2 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/webui/bookmarks_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 object:[bookmarkBubbleController_ window]]; 1621 object:[bookmarkBubbleController_ window]];
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 // A BookmarkEditorController is a sheet that owns itself, and 1632 BookmarkEditor::Show([self window], browser_->profile(),
1633 // deallocates itself when closed. 1633 BookmarkEditor::EditDetails::EditNode(node),
1634 [[[BookmarkEditorController alloc] 1634 BookmarkEditor::SHOW_TREE);
1635 initWithParentWindow:[self window]
1636 profile:browser_->profile()
1637 parent:node->parent()
1638 node:node
1639 configuration:BookmarkEditor::SHOW_TREE]
1640 runAsModalSheet];
1641 }
1642 } 1635 }
1643 } 1636 }
1644 1637
1645 // If the browser is in incognito mode or has multi-profiles, install the image 1638 // If the browser is in incognito mode or has multi-profiles, install the image
1646 // view to decorate the window at the upper right. Use the same base y 1639 // view to decorate the window at the upper right. Use the same base y
1647 // coordinate as the tab strip. 1640 // coordinate as the tab strip.
1648 - (void)installAvatar { 1641 - (void)installAvatar {
1649 // Install the image into the badge view. Hide it for now; positioning and 1642 // Install the image into the badge view. Hide it for now; positioning and
1650 // sizing will be done by the layout code. The AvatarButton will choose which 1643 // sizing will be done by the layout code. The AvatarButton will choose which
1651 // image to display based on the browser. 1644 // image to display based on the browser.
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 2164
2172 - (BOOL)supportsBookmarkBar { 2165 - (BOOL)supportsBookmarkBar {
2173 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2166 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2174 } 2167 }
2175 2168
2176 - (BOOL)isTabbedWindow { 2169 - (BOOL)isTabbedWindow {
2177 return browser_->is_type_tabbed(); 2170 return browser_->is_type_tabbed();
2178 } 2171 }
2179 2172
2180 @end // @implementation BrowserWindowController(WindowType) 2173 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/webui/bookmarks_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698