| 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/native_app_window_views.h" | 5 #include "chrome/browser/ui/views/extensions/native_app_window_views.h" |
| 6 | 6 |
| 7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
| 8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
| 9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 // Don't round the top corners in chrome-style frame mode. | 320 // Don't round the top corners in chrome-style frame mode. |
| 321 path.moveTo(0, 0); | 321 path.moveTo(0, 0); |
| 322 path.lineTo(width, 0); | 322 path.lineTo(width, 0); |
| 323 } | 323 } |
| 324 path.lineTo(width, height - radius - 1); | 324 path.lineTo(width, height - radius - 1); |
| 325 path.lineTo(width - radius - 1, height); | 325 path.lineTo(width - radius - 1, height); |
| 326 path.lineTo(radius + 1, height); | 326 path.lineTo(radius + 1, height); |
| 327 path.lineTo(0, height - radius - 1); | 327 path.lineTo(0, height - radius - 1); |
| 328 path.close(); | 328 path.close(); |
| 329 } | 329 } |
| 330 SetWindowRgn(web_contents()->GetNativeView(), path.CreateNativeRegion(), 1); | 330 SetWindowRgn(web_contents()->GetView()->GetNativeView(), |
| 331 path.CreateNativeRegion(), 1); |
| 331 | 332 |
| 332 SkRegion* rgn = new SkRegion; | 333 SkRegion* rgn = new SkRegion; |
| 333 if (!window_->IsFullscreen()) { | 334 if (!window_->IsFullscreen()) { |
| 334 if (draggable_region()) | 335 if (draggable_region()) |
| 335 rgn->op(*draggable_region(), SkRegion::kUnion_Op); | 336 rgn->op(*draggable_region(), SkRegion::kUnion_Op); |
| 336 if (!window_->IsMaximized()) { | 337 if (!window_->IsMaximized()) { |
| 337 if (frameless_) | 338 if (frameless_) |
| 338 rgn->op(0, 0, width, kResizeInsideBoundsSize, SkRegion::kUnion_Op); | 339 rgn->op(0, 0, width, kResizeInsideBoundsSize, SkRegion::kUnion_Op); |
| 339 rgn->op(0, 0, kResizeInsideBoundsSize, height, SkRegion::kUnion_Op); | 340 rgn->op(0, 0, kResizeInsideBoundsSize, height, SkRegion::kUnion_Op); |
| 340 rgn->op(width - kResizeInsideBoundsSize, 0, width, height, | 341 rgn->op(width - kResizeInsideBoundsSize, 0, width, height, |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 } | 586 } |
| 586 | 587 |
| 587 //------------------------------------------------------------------------------ | 588 //------------------------------------------------------------------------------ |
| 588 // NativeAppWindow::Create | 589 // NativeAppWindow::Create |
| 589 | 590 |
| 590 // static | 591 // static |
| 591 NativeAppWindow* NativeAppWindow::Create( | 592 NativeAppWindow* NativeAppWindow::Create( |
| 592 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 593 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 593 return new NativeAppWindowViews(shell_window, params); | 594 return new NativeAppWindowViews(shell_window, params); |
| 594 } | 595 } |
| OLD | NEW |