| OLD | NEW |
| 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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 | 1157 |
| 1158 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( | 1158 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( |
| 1159 const gfx::Rect& bounds) { | 1159 const gfx::Rect& bounds) { |
| 1160 return NEW_POPUP; | 1160 return NEW_POPUP; |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 FindBar* BrowserWindowGtk::CreateFindBar() { | 1163 FindBar* BrowserWindowGtk::CreateFindBar() { |
| 1164 return new FindBarGtk(this); | 1164 return new FindBarGtk(this); |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 int BrowserWindowGtk::GetConstrainedWindowTopY() { |
| 1168 return -1; |
| 1169 } |
| 1170 |
| 1167 void BrowserWindowGtk::ShowAvatarBubble(WebContents* web_contents, | 1171 void BrowserWindowGtk::ShowAvatarBubble(WebContents* web_contents, |
| 1168 const gfx::Rect& rect) { | 1172 const gfx::Rect& rect) { |
| 1169 GtkWidget* widget = web_contents->GetContentNativeView(); | 1173 GtkWidget* widget = web_contents->GetContentNativeView(); |
| 1170 new AvatarMenuBubbleGtk(browser_.get(), widget, | 1174 new AvatarMenuBubbleGtk(browser_.get(), widget, |
| 1171 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect); | 1175 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect); |
| 1172 } | 1176 } |
| 1173 | 1177 |
| 1174 void BrowserWindowGtk::ShowAvatarBubbleFromAvatarButton() { | 1178 void BrowserWindowGtk::ShowAvatarBubbleFromAvatarButton() { |
| 1175 if (titlebar_->avatar_button()) | 1179 if (titlebar_->avatar_button()) |
| 1176 titlebar_->avatar_button()->ShowAvatarBubble(); | 1180 titlebar_->avatar_button()->ShowAvatarBubble(); |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 wm_type == ui::WM_OPENBOX || | 2417 wm_type == ui::WM_OPENBOX || |
| 2414 wm_type == ui::WM_XFWM4); | 2418 wm_type == ui::WM_XFWM4); |
| 2415 } | 2419 } |
| 2416 | 2420 |
| 2417 // static | 2421 // static |
| 2418 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2422 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2419 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2423 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2420 browser_window_gtk->Init(); | 2424 browser_window_gtk->Init(); |
| 2421 return browser_window_gtk; | 2425 return browser_window_gtk; |
| 2422 } | 2426 } |
| OLD | NEW |