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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 11316292: Add app.window.setIcon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698