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

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 10911020: Enable commands API for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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/browser_window_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 1815
1816 // We have to realize the window before we try to apply a window shape mask. 1816 // We have to realize the window before we try to apply a window shape mask.
1817 gtk_widget_realize(GTK_WIDGET(window_)); 1817 gtk_widget_realize(GTK_WIDGET(window_));
1818 state_ = gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET(window_))); 1818 state_ = gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET(window_)));
1819 // Note that calling this the first time is necessary to get the 1819 // Note that calling this the first time is necessary to get the
1820 // proper control layout. 1820 // proper control layout.
1821 UpdateCustomFrame(); 1821 UpdateCustomFrame();
1822 1822
1823 // Add the keybinding registry, now that the window has been realized. 1823 // Add the keybinding registry, now that the window has been realized.
1824 extension_keybinding_registry_.reset( 1824 extension_keybinding_registry_.reset(
1825 new ExtensionKeybindingRegistryGtk(browser_->profile(), window_)); 1825 new ExtensionKeybindingRegistryGtk(browser_->profile(), window_,
1826 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS));
1826 1827
1827 // We have to call this after the first window is created, but after that only 1828 // We have to call this after the first window is created, but after that only
1828 // when the theme changes. This sets the icon that will be used for windows 1829 // when the theme changes. This sets the icon that will be used for windows
1829 // that have not explicitly been assigned an icon. 1830 // that have not explicitly been assigned an icon.
1830 static bool default_icon_set = false; 1831 static bool default_icon_set = false;
1831 if (!default_icon_set) { 1832 if (!default_icon_set) {
1832 gtk_util::SetDefaultWindowIcon(window_); 1833 gtk_util::SetDefaultWindowIcon(window_);
1833 default_icon_set = true; 1834 default_icon_set = true;
1834 } 1835 }
1835 // Set this window's (potentially profile-avatar-emblemed) icon, overriding 1836 // Set this window's (potentially profile-avatar-emblemed) icon, overriding
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 wm_type == ui::WM_OPENBOX || 2433 wm_type == ui::WM_OPENBOX ||
2433 wm_type == ui::WM_XFWM4); 2434 wm_type == ui::WM_XFWM4);
2434 } 2435 }
2435 2436
2436 // static 2437 // static
2437 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2438 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2438 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2439 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2439 browser_window_gtk->Init(); 2440 browser_window_gtk->Init();
2440 return browser_window_gtk; 2441 return browser_window_gtk;
2441 } 2442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698