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

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

Issue 11369237: Add a way to fetch window frame metrics from NativeShellWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comments Created 8 years, 1 month 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 "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h" 9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h"
10 #include "chrome/browser/ui/gtk/gtk_util.h" 10 #include "chrome/browser/ui/gtk/gtk_util.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 void ShellWindowGtk::FlashFrame(bool flash) { 222 void ShellWindowGtk::FlashFrame(bool flash) {
223 gtk_window_set_urgency_hint(window_, flash); 223 gtk_window_set_urgency_hint(window_, flash);
224 } 224 }
225 225
226 bool ShellWindowGtk::IsAlwaysOnTop() const { 226 bool ShellWindowGtk::IsAlwaysOnTop() const {
227 return false; 227 return false;
228 } 228 }
229 229
230 gfx::Rect ShellWindowGtk::ContentBoundsForWindowBounds(
231 const gfx::Rect& window_bounds) const {
232 // TODO(jeremya): implement.
233 return window_bounds;
234 }
235
236 gfx::Rect ShellWindowGtk::WindowBoundsForContentBounds(
237 const gfx::Rect& content_bounds) const {
238 // TODO(jeremya): implement.
239 return content_bounds;
240 }
241
230 void ShellWindowGtk::ActiveWindowChanged(GdkWindow* active_window) { 242 void ShellWindowGtk::ActiveWindowChanged(GdkWindow* active_window) {
231 // Do nothing if we're in the process of closing the browser window. 243 // Do nothing if we're in the process of closing the browser window.
232 if (!window_) 244 if (!window_)
233 return; 245 return;
234 246
235 is_active_ = gtk_widget_get_window(GTK_WIDGET(window_)) == active_window; 247 is_active_ = gtk_widget_get_window(GTK_WIDGET(window_)) == active_window;
236 } 248 }
237 249
238 // Callback for the delete event. This event is fired when the user tries to 250 // Callback for the delete event. This event is fired when the user tries to
239 // close the window (e.g., clicking on the X in the window manager title bar). 251 // close the window (e.g., clicking on the X in the window manager title bar).
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 return; 373 return;
362 374
363 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); 375 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions));
364 } 376 }
365 377
366 // static 378 // static
367 NativeShellWindow* NativeShellWindow::Create( 379 NativeShellWindow* NativeShellWindow::Create(
368 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 380 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
369 return new ShellWindowGtk(shell_window, params); 381 return new ShellWindowGtk(shell_window, params);
370 } 382 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698