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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_frame_view.cc

Issue 7242017: Support minimizing the panel into 3-pixel line on Windows. Also support bringing up/down the titl... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" 5 #include "chrome/browser/ui/panels/panel_browser_frame_view.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/ui/panels/panel.h" 10 #include "chrome/browser/ui/panels/panel.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 UpdateControlStyles(browser_view_->focused() ? 319 UpdateControlStyles(browser_view_->focused() ?
320 PAINT_AS_ACTIVE : PAINT_AS_INACTIVE); 320 PAINT_AS_ACTIVE : PAINT_AS_INACTIVE);
321 PaintFrameBorder(canvas); 321 PaintFrameBorder(canvas);
322 PaintClientEdge(canvas); 322 PaintClientEdge(canvas);
323 } 323 }
324 324
325 void PanelBrowserFrameView::OnThemeChanged() { 325 void PanelBrowserFrameView::OnThemeChanged() {
326 LoadImageResources(); 326 LoadImageResources();
327 } 327 }
328 328
329 gfx::Size PanelBrowserFrameView::GetMinimumSize() {
330 return gfx::Size();
jennb 2011/06/30 17:33:31 Don't we have to ensure there is a minimum width -
jianli 2011/06/30 18:22:36 Added comment for doing thing like this.
331 }
332
329 void PanelBrowserFrameView::Layout() { 333 void PanelBrowserFrameView::Layout() {
330 // Layout the close button. 334 // Layout the close button.
331 gfx::Size close_button_size = close_button_->GetPreferredSize(); 335 gfx::Size close_button_size = close_button_->GetPreferredSize();
332 close_button_->SetBounds( 336 close_button_->SetBounds(
333 width() - kFrameBorderThickness - kButtonSpacing - 337 width() - kFrameBorderThickness - kButtonSpacing -
334 close_button_size.width(), 338 close_button_size.width(),
335 (NonClientTopBorderHeight() - close_button_size.height()) / 2, 339 (NonClientTopBorderHeight() - close_button_size.height()) / 2,
336 close_button_size.width(), 340 close_button_size.width(),
337 close_button_size.height()); 341 close_button_size.height());
338 342
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 settings_menu_contents_->AddItem( 674 settings_menu_contents_->AddItem(
671 COMMAND_DISABLE, l10n_util::GetStringUTF16(IDS_EXTENSIONS_DISABLE)); 675 COMMAND_DISABLE, l10n_util::GetStringUTF16(IDS_EXTENSIONS_DISABLE));
672 settings_menu_contents_->AddItem( 676 settings_menu_contents_->AddItem(
673 COMMAND_UNINSTALL, l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL)); 677 COMMAND_UNINSTALL, l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL));
674 settings_menu_contents_->AddSeparator(); 678 settings_menu_contents_->AddSeparator();
675 settings_menu_contents_->AddItem( 679 settings_menu_contents_->AddItem(
676 COMMAND_MANAGE, l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSIONS)); 680 COMMAND_MANAGE, l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSIONS));
677 681
678 settings_menu_.reset(new views::Menu2(settings_menu_contents_.get())); 682 settings_menu_.reset(new views::Menu2(settings_menu_contents_.get()));
679 } 683 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698