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

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

Issue 10919046: Allow panels to be created as detached panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid panel_create_mode being unused_var in Ash Created 8 years, 3 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) 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/panels/panel_view.h" 5 #include "chrome/browser/ui/panels/panel_view.h"
6 6
7 #include <map> 7 #include <map>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/ui/panels/panel.h" 10 #include "chrome/browser/ui/panels/panel.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 } // namespace 155 } // namespace
156 156
157 // static 157 // static
158 NativePanel* Panel::CreateNativePanel(Panel* panel, const gfx::Rect& bounds) { 158 NativePanel* Panel::CreateNativePanel(Panel* panel, const gfx::Rect& bounds) {
159 return new PanelView(panel, bounds); 159 return new PanelView(panel, bounds);
160 } 160 }
161 161
162 PanelView::PanelView(Panel* panel, const gfx::Rect& bounds) 162 PanelView::PanelView(Panel* panel, const gfx::Rect& bounds)
163 : panel_(panel), 163 : panel_(panel),
164 bounds_(bounds),
164 window_(NULL), 165 window_(NULL),
165 web_view_(NULL), 166 web_view_(NULL),
166 focused_(false), 167 focused_(false),
167 mouse_pressed_(false), 168 mouse_pressed_(false),
168 mouse_dragging_state_(NO_DRAGGING), 169 mouse_dragging_state_(NO_DRAGGING),
169 is_drawing_attention_(false), 170 is_drawing_attention_(false),
170 force_to_paint_as_inactive_(false), 171 force_to_paint_as_inactive_(false),
171 old_focused_view_(NULL) { 172 old_focused_view_(NULL) {
172 window_ = new views::Widget; 173 window_ = new views::Widget;
173 views::Widget::InitParams params(views::Widget::InitParams::TYPE_PANEL); 174 views::Widget::InitParams params(views::Widget::InitParams::TYPE_PANEL);
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 int height = web_view_->size().height(); 744 int height = web_view_->size().height();
744 SkRegion* region = new SkRegion; 745 SkRegion* region = new SkRegion;
745 region->op(0, 0, kResizeInsideBoundsSize, height, SkRegion::kUnion_Op); 746 region->op(0, 0, kResizeInsideBoundsSize, height, SkRegion::kUnion_Op);
746 region->op(width - kResizeInsideBoundsSize, 0, width, height, 747 region->op(width - kResizeInsideBoundsSize, 0, width, height,
747 SkRegion::kUnion_Op); 748 SkRegion::kUnion_Op);
748 region->op(0, height - kResizeInsideBoundsSize, width, height, 749 region->op(0, height - kResizeInsideBoundsSize, width, height,
749 SkRegion::kUnion_Op); 750 SkRegion::kUnion_Op);
750 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); 751 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region);
751 #endif 752 #endif
752 } 753 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm ('k') | chrome/common/extensions/api/windows.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698