summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 22:26:53 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 22:26:53 +0000
commitcb71491f6fd9eb062ecbce3df5ca543c77652d91 (patch)
tree2a2eba85ee8a57f207bbb3241f41e1b01c55c97f /chrome/browser/browser.cc
parent2c36d61f64d9383dc90576164e3f09b313e2f7a7 (diff)
downloadchromium_src-cb71491f6fd9eb062ecbce3df5ca543c77652d91.zip
chromium_src-cb71491f6fd9eb062ecbce3df5ca543c77652d91.tar.gz
chromium_src-cb71491f6fd9eb062ecbce3df5ca543c77652d91.tar.bz2
Fix two problems with bookmarking and fullscreen mode:
* The bubble didn't close when toggling in/out of fullscreen mode. This was because we only ever closed on an activation change, rather than on a window move. Made the bubble close when the window moves. This required refactoring the bubble code to have a static instance; once I did that I also cleaned up the rest of the code a bit to not check if the bubble was already showing, and just let the bookmark bubble itself take care of this. * The bubble positioning was wrong in fullscreen mode. This was because the toolbar layout was in turn wrong in fullscreen mode. Made the toolbars able to handle being 0-height. BUG=534 TEST=Bookmark a page and hit F11. The bubble should disappear. Hit ctrl-D. The bubble should appear at the right spot, not floating in the middle of the screen. Hit F11 again. The bubble should disappear, and the toolbar button should be drawn undepressed. Review URL: http://codereview.chromium.org/21479 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 147374e..0fc5f33 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -737,8 +737,7 @@ void Browser::BookmarkCurrentPage() {
return;
model->SetURLStarred(url, entry->title(), true);
- if (!window_->IsBookmarkBubbleVisible())
- window_->ShowBookmarkBubble(url, model->IsBookmarked(url));
+ window_->ShowBookmarkBubble(url, model->IsBookmarked(url));
}
void Browser::ViewSource() {
@@ -2047,7 +2046,7 @@ void Browser::UpdateCommandsForTabState() {
bool is_web_contents = web_contents != NULL;
// Page-related commands
- // Only allow bookmarking for tabbed browsers.
+ // Only allow bookmarking for web content in normal windows.
command_updater_.UpdateCommandEnabled(IDC_STAR,
is_web_contents && (type() == TYPE_NORMAL));
window_->SetStarredState(is_web_contents && web_contents->is_starred());