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

Side by Side Diff: chrome/browser/ui/gtk/extensions/shell_window_gtk.cc

Issue 10443075: Coverity PASS_BY_VALUE fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 6 months 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/gtk/extensions/shell_window_gtk.h" 5 #include "chrome/browser/ui/gtk/extensions/shell_window_gtk.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 #include "content/public/browser/render_widget_host_view.h" 9 #include "content/public/browser/render_widget_host_view.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_contents_view.h" 11 #include "content/public/browser/web_contents_view.h"
12 #include "ui/base/x/active_window_watcher_x.h" 12 #include "ui/base/x/active_window_watcher_x.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 14
15 ShellWindowGtk::ShellWindowGtk(Profile* profile, 15 ShellWindowGtk::ShellWindowGtk(Profile* profile,
16 const extensions::Extension* extension, 16 const extensions::Extension* extension,
17 const GURL& url, 17 const GURL& url,
18 const ShellWindow::CreateParams params) 18 const ShellWindow::CreateParams& params)
19 : ShellWindow(profile, extension, url), 19 : ShellWindow(profile, extension, url),
20 state_(GDK_WINDOW_STATE_WITHDRAWN), 20 state_(GDK_WINDOW_STATE_WITHDRAWN),
21 is_active_(!ui::ActiveWindowWatcherX::WMSupportsActivation()) { 21 is_active_(!ui::ActiveWindowWatcherX::WMSupportsActivation()) {
22 window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); 22 window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
23 23
24 gfx::NativeView native_view = 24 gfx::NativeView native_view =
25 web_contents()->GetView()->GetNativeView(); 25 web_contents()->GetView()->GetNativeView();
26 gtk_container_add(GTK_CONTAINER(window_), native_view); 26 gtk_container_add(GTK_CONTAINER(window_), native_view);
27 27
28 gtk_window_set_default_size( 28 gtk_window_set_default_size(
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 gboolean ShellWindowGtk::OnWindowState(GtkWidget* sender, 167 gboolean ShellWindowGtk::OnWindowState(GtkWidget* sender,
168 GdkEventWindowState* event) { 168 GdkEventWindowState* event) {
169 state_ = event->new_window_state; 169 state_ = event->new_window_state;
170 return FALSE; 170 return FALSE;
171 } 171 }
172 172
173 // static 173 // static
174 ShellWindow* ShellWindow::CreateImpl(Profile* profile, 174 ShellWindow* ShellWindow::CreateImpl(Profile* profile,
175 const extensions::Extension* extension, 175 const extensions::Extension* extension,
176 const GURL& url, 176 const GURL& url,
177 const ShellWindow::CreateParams params) { 177 const ShellWindow::CreateParams& params) {
178 return new ShellWindowGtk(profile, extension, url, params); 178 return new ShellWindowGtk(profile, extension, url, params);
179 } 179 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/extensions/shell_window_gtk.h ('k') | chrome/browser/ui/views/extensions/shell_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698