| 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 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 | 1154 |
| 1155 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( | 1155 WindowOpenDisposition BrowserWindowGtk::GetDispositionForPopupBounds( |
| 1156 const gfx::Rect& bounds) { | 1156 const gfx::Rect& bounds) { |
| 1157 return NEW_POPUP; | 1157 return NEW_POPUP; |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 FindBar* BrowserWindowGtk::CreateFindBar() { | 1160 FindBar* BrowserWindowGtk::CreateFindBar() { |
| 1161 return new FindBarGtk(this); | 1161 return new FindBarGtk(this); |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 int BrowserWindowGtk::GetConstrainedWindowTopY() { |
| 1165 return -1; |
| 1166 } |
| 1167 |
| 1164 void BrowserWindowGtk::ShowAvatarBubble(WebContents* web_contents, | 1168 void BrowserWindowGtk::ShowAvatarBubble(WebContents* web_contents, |
| 1165 const gfx::Rect& rect) { | 1169 const gfx::Rect& rect) { |
| 1166 GtkWidget* widget = web_contents->GetContentNativeView(); | 1170 GtkWidget* widget = web_contents->GetContentNativeView(); |
| 1167 new AvatarMenuBubbleGtk(browser_.get(), widget, | 1171 new AvatarMenuBubbleGtk(browser_.get(), widget, |
| 1168 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect); | 1172 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect); |
| 1169 } | 1173 } |
| 1170 | 1174 |
| 1171 void BrowserWindowGtk::ShowAvatarBubbleFromAvatarButton() { | 1175 void BrowserWindowGtk::ShowAvatarBubbleFromAvatarButton() { |
| 1172 if (titlebar_->avatar_button()) | 1176 if (titlebar_->avatar_button()) |
| 1173 titlebar_->avatar_button()->ShowAvatarBubble(); | 1177 titlebar_->avatar_button()->ShowAvatarBubble(); |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2433 wm_type == ui::WM_OPENBOX || | 2437 wm_type == ui::WM_OPENBOX || |
| 2434 wm_type == ui::WM_XFWM4); | 2438 wm_type == ui::WM_XFWM4); |
| 2435 } | 2439 } |
| 2436 | 2440 |
| 2437 // static | 2441 // static |
| 2438 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2442 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2439 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2443 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2440 browser_window_gtk->Init(); | 2444 browser_window_gtk->Init(); |
| 2441 return browser_window_gtk; | 2445 return browser_window_gtk; |
| 2442 } | 2446 } |
| OLD | NEW |