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

Side by Side Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 13853010: Make panels turn on or off shadow effect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 7 years, 8 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/views/panels/panel_view.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/panels/panel_view.h" 5 #include "chrome/browser/ui/views/panels/panel_view.h"
6 6
7 #include <map> 7 #include <map>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 } 637 }
638 638
639 void PanelView::MinimizePanelBySystem() { 639 void PanelView::MinimizePanelBySystem() {
640 window_->Minimize(); 640 window_->Minimize();
641 } 641 }
642 642
643 bool PanelView::IsPanelMinimizedBySystem() const { 643 bool PanelView::IsPanelMinimizedBySystem() const {
644 return window_->IsMinimized(); 644 return window_->IsMinimized();
645 } 645 }
646 646
647 void PanelView::ShowShadow(bool show) {
648 #if defined(OS_WIN)
649 // The overlapped window has the shadow while the popup window does not have
650 // the shadow.
651 int overlap_style = WS_OVERLAPPED | WS_THICKFRAME | WS_SYSMENU;
652 int popup_style = WS_POPUP;
653 UpdateWindowAttribute(GWL_STYLE,
654 show ? overlap_style : popup_style,
655 show ? popup_style : overlap_style,
656 true);
657 #endif
658 }
659
647 void PanelView::AttachWebContents(content::WebContents* contents) { 660 void PanelView::AttachWebContents(content::WebContents* contents) {
648 web_view_->SetWebContents(contents); 661 web_view_->SetWebContents(contents);
649 } 662 }
650 663
651 void PanelView::DetachWebContents(content::WebContents* contents) { 664 void PanelView::DetachWebContents(content::WebContents* contents) {
652 web_view_->SetWebContents(NULL); 665 web_view_->SetWebContents(NULL);
653 } 666 }
654 667
655 NativePanelTesting* PanelView::CreateNativePanelTesting() { 668 NativePanelTesting* PanelView::CreateNativePanelTesting() {
656 return new NativePanelTestingWin(this); 669 return new NativePanelTestingWin(this);
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 DCHECK(thickness_for_mouse_resizing > 0); 1081 DCHECK(thickness_for_mouse_resizing > 0);
1069 SkRegion* region = new SkRegion; 1082 SkRegion* region = new SkRegion;
1070 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); 1083 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op);
1071 region->op(width - thickness_for_mouse_resizing, 0, width, height, 1084 region->op(width - thickness_for_mouse_resizing, 0, width, height,
1072 SkRegion::kUnion_Op); 1085 SkRegion::kUnion_Op);
1073 region->op(0, height - thickness_for_mouse_resizing, width, height, 1086 region->op(0, height - thickness_for_mouse_resizing, width, height,
1074 SkRegion::kUnion_Op); 1087 SkRegion::kUnion_Op);
1075 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); 1088 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region);
1076 #endif 1089 #endif
1077 } 1090 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/panels/panel_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698