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

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 // This makes the panel be able to shrink to very small, like 3-pixel lines.
331 // Since the panel cannot be resized by the user, we do not need to enforce
332 // the minimum size.
333 return gfx::Size();
334 }
335
329 void PanelBrowserFrameView::Layout() { 336 void PanelBrowserFrameView::Layout() {
330 // Layout the close button. 337 // Layout the close button.
331 gfx::Size close_button_size = close_button_->GetPreferredSize(); 338 gfx::Size close_button_size = close_button_->GetPreferredSize();
332 close_button_->SetBounds( 339 close_button_->SetBounds(
333 width() - kFrameBorderThickness - kButtonSpacing - 340 width() - kFrameBorderThickness - kButtonSpacing -
334 close_button_size.width(), 341 close_button_size.width(),
335 (NonClientTopBorderHeight() - close_button_size.height()) / 2, 342 (NonClientTopBorderHeight() - close_button_size.height()) / 2,
336 close_button_size.width(), 343 close_button_size.width(),
337 close_button_size.height()); 344 close_button_size.height());
338 345
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 settings_menu_contents_->AddItem( 677 settings_menu_contents_->AddItem(
671 COMMAND_DISABLE, l10n_util::GetStringUTF16(IDS_EXTENSIONS_DISABLE)); 678 COMMAND_DISABLE, l10n_util::GetStringUTF16(IDS_EXTENSIONS_DISABLE));
672 settings_menu_contents_->AddItem( 679 settings_menu_contents_->AddItem(
673 COMMAND_UNINSTALL, l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL)); 680 COMMAND_UNINSTALL, l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL));
674 settings_menu_contents_->AddSeparator(); 681 settings_menu_contents_->AddSeparator();
675 settings_menu_contents_->AddItem( 682 settings_menu_contents_->AddItem(
676 COMMAND_MANAGE, l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSIONS)); 683 COMMAND_MANAGE, l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSIONS));
677 684
678 settings_menu_.reset(new views::Menu2(settings_menu_contents_.get())); 685 settings_menu_.reset(new views::Menu2(settings_menu_contents_.get()));
679 } 686 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_frame_view.h ('k') | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698