OLD | NEW |
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/extensions/shell_window_views.h" | 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
9 #include "chrome/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" |
10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 } | 201 } |
202 SetWindowRgn(host_->view()->native_view(), path.CreateNativeRegion(), 1); | 202 SetWindowRgn(host_->view()->native_view(), path.CreateNativeRegion(), 1); |
203 | 203 |
204 SkRegion* rgn = new SkRegion; | 204 SkRegion* rgn = new SkRegion; |
205 rgn->op(0, 0, width, 20, SkRegion::kUnion_Op); | 205 rgn->op(0, 0, width, 20, SkRegion::kUnion_Op); |
206 if (!GetWidget()->IsMaximized()) { | 206 if (!GetWidget()->IsMaximized()) { |
207 rgn->op(0, 0, kResizeBorderWidth, height, SkRegion::kUnion_Op); | 207 rgn->op(0, 0, kResizeBorderWidth, height, SkRegion::kUnion_Op); |
208 rgn->op(width - kResizeBorderWidth, 0, width, height, SkRegion::kUnion_Op); | 208 rgn->op(width - kResizeBorderWidth, 0, width, height, SkRegion::kUnion_Op); |
209 rgn->op(0, height - kResizeBorderWidth, width, height, SkRegion::kUnion_Op); | 209 rgn->op(0, height - kResizeBorderWidth, width, height, SkRegion::kUnion_Op); |
210 } | 210 } |
211 host_->render_view_host()->view()->SetClickthroughRegion(rgn); | 211 host_->render_view_host()->GetView()->SetClickthroughRegion(rgn); |
212 #endif | 212 #endif |
213 } | 213 } |
214 | 214 |
215 // static | 215 // static |
216 ShellWindow* ShellWindow::CreateShellWindow(ExtensionHost* host) { | 216 ShellWindow* ShellWindow::CreateShellWindow(ExtensionHost* host) { |
217 return new ShellWindowViews(host); | 217 return new ShellWindowViews(host); |
218 } | 218 } |
OLD | NEW |