| 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/extensions/shell_window.h" | 5 #include "chrome/browser/ui/extensions/shell_window.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/extensions/extension_process_manager.h" | 9 #include "chrome/browser/extensions/extension_process_manager.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 const extensions::Extension* extension, | 86 const extensions::Extension* extension, |
| 87 const GURL& url, | 87 const GURL& url, |
| 88 const ShellWindow::CreateParams& params) { | 88 const ShellWindow::CreateParams& params) { |
| 89 // This object will delete itself when the window is closed. | 89 // This object will delete itself when the window is closed. |
| 90 ShellWindow* window = new ShellWindow(profile, extension); | 90 ShellWindow* window = new ShellWindow(profile, extension); |
| 91 window->Init(url, params); | 91 window->Init(url, params); |
| 92 extensions::ShellWindowRegistry::Get(profile)->AddShellWindow(window); | 92 extensions::ShellWindowRegistry::Get(profile)->AddShellWindow(window); |
| 93 return window; | 93 return window; |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ShellWindow::SetLauncherIconUrl(const GURL& url) { |
| 97 launcher_icon_url_ = url; |
| 98 extensions::ShellWindowRegistry::Get(profile_)->UpdateShellWindow(this); |
| 99 } |
| 100 |
| 96 ShellWindow::ShellWindow(Profile* profile, | 101 ShellWindow::ShellWindow(Profile* profile, |
| 97 const extensions::Extension* extension) | 102 const extensions::Extension* extension) |
| 98 : profile_(profile), | 103 : profile_(profile), |
| 99 extension_(extension), | 104 extension_(extension), |
| 100 web_contents_(NULL), | 105 web_contents_(NULL), |
| 101 ALLOW_THIS_IN_INITIALIZER_LIST( | 106 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 102 extension_function_dispatcher_(profile, this)) { | 107 extension_function_dispatcher_(profile, this)) { |
| 103 } | 108 } |
| 104 | 109 |
| 105 void ShellWindow::Init(const GURL& url, | 110 void ShellWindow::Init(const GURL& url, |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 const extensions::DraggableRegion& region = *iter; | 540 const extensions::DraggableRegion& region = *iter; |
| 536 sk_region->op( | 541 sk_region->op( |
| 537 region.bounds.x(), | 542 region.bounds.x(), |
| 538 region.bounds.y(), | 543 region.bounds.y(), |
| 539 region.bounds.right(), | 544 region.bounds.right(), |
| 540 region.bounds.bottom(), | 545 region.bounds.bottom(), |
| 541 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 546 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 542 } | 547 } |
| 543 return sk_region; | 548 return sk_region; |
| 544 } | 549 } |
| OLD | NEW |