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

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: Add comments to .idl 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 const extensions::Extension* extension, 87 const extensions::Extension* extension,
88 const GURL& url, 88 const GURL& url,
89 const CreateParams& params) { 89 const CreateParams& params) {
90 // This object will delete itself when the window is closed. 90 // This object will delete itself when the window is closed.
91 ShellWindow* window = new ShellWindow(profile, extension); 91 ShellWindow* window = new ShellWindow(profile, extension);
92 window->Init(url, params); 92 window->Init(url, params);
93 extensions::ShellWindowRegistry::Get(profile)->AddShellWindow(window); 93 extensions::ShellWindowRegistry::Get(profile)->AddShellWindow(window);
94 return window; 94 return window;
95 } 95 }
96 96
97 void ShellWindow::SetAppIconUrl(const GURL& url) {
98 app_icon_url_ = url;
99 extensions::ShellWindowRegistry::Get(profile_)->ShellWindowIconChanged(this);
100 }
101
97 ShellWindow::ShellWindow(Profile* profile, 102 ShellWindow::ShellWindow(Profile* profile,
98 const extensions::Extension* extension) 103 const extensions::Extension* extension)
99 : profile_(profile), 104 : profile_(profile),
100 extension_(extension), 105 extension_(extension),
101 web_contents_(NULL), 106 web_contents_(NULL),
102 window_type_(WINDOW_TYPE_DEFAULT), 107 window_type_(WINDOW_TYPE_DEFAULT),
103 ALLOW_THIS_IN_INITIALIZER_LIST( 108 ALLOW_THIS_IN_INITIALIZER_LIST(
104 extension_function_dispatcher_(profile, this)) { 109 extension_function_dispatcher_(profile, this)) {
105 } 110 }
106 111
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 const extensions::DraggableRegion& region = *iter; 559 const extensions::DraggableRegion& region = *iter;
555 sk_region->op( 560 sk_region->op(
556 region.bounds.x(), 561 region.bounds.x(),
557 region.bounds.y(), 562 region.bounds.y(),
558 region.bounds.right(), 563 region.bounds.right(),
559 region.bounds.bottom(), 564 region.bounds.bottom(),
560 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 565 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
561 } 566 }
562 return sk_region; 567 return sk_region;
563 } 568 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/common/extensions/api/app_current_window_internal.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698