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

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

Issue 10458018: This CL does the following: (1) Pass the max_length attribute to the password generator; (2) Update… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a windows UI bug. 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/browser_window_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect); 1273 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect);
1274 } 1274 }
1275 1275
1276 void BrowserWindowGtk::ShowAvatarBubbleFromAvatarButton() { 1276 void BrowserWindowGtk::ShowAvatarBubbleFromAvatarButton() {
1277 if (titlebar_->avatar_button()) 1277 if (titlebar_->avatar_button())
1278 titlebar_->avatar_button()->ShowAvatarBubble(); 1278 titlebar_->avatar_button()->ShowAvatarBubble();
1279 } 1279 }
1280 1280
1281 void BrowserWindowGtk::ShowPasswordGenerationBubble( 1281 void BrowserWindowGtk::ShowPasswordGenerationBubble(
1282 const gfx::Rect& rect, 1282 const gfx::Rect& rect,
1283 autofill::PasswordGenerator* password_generator,
1283 const webkit::forms::PasswordForm& form) { 1284 const webkit::forms::PasswordForm& form) {
1284 WebContents* web_contents = browser_->GetSelectedWebContents(); 1285 WebContents* web_contents = browser_->GetSelectedWebContents();
1285 if (!web_contents || !web_contents->GetContentNativeView()) { 1286 if (!web_contents || !web_contents->GetContentNativeView()) {
1286 return; 1287 return;
1287 } 1288 }
1288 1289
1289 TabContentsWrapper* tab_contents = 1290 TabContentsWrapper* tab_contents =
1290 TabContentsWrapper::GetCurrentWrapperForContents(web_contents); 1291 TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
1291 if (!tab_contents) 1292 if (!tab_contents)
1292 return; 1293 return;
1293 1294
1294 new PasswordGenerationBubbleGtk(rect, 1295 new PasswordGenerationBubbleGtk(rect,
1295 form, 1296 form,
1296 web_contents->GetContentNativeView(), 1297 web_contents->GetContentNativeView(),
1297 browser()->profile(), 1298 browser()->profile(),
1298 web_contents->GetRenderViewHost(), 1299 web_contents->GetRenderViewHost(),
1300 password_generator,
1299 tab_contents->password_manager()); 1301 tab_contents->password_manager());
1300 } 1302 }
1301 1303
1302 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { 1304 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() {
1303 DownloadInProgressDialogGtk::Show(browser(), GetNativeHandle()); 1305 DownloadInProgressDialogGtk::Show(browser(), GetNativeHandle());
1304 } 1306 }
1305 1307
1306 void BrowserWindowGtk::Observe(int type, 1308 void BrowserWindowGtk::Observe(int type,
1307 const content::NotificationSource& source, 1309 const content::NotificationSource& source,
1308 const content::NotificationDetails& details) { 1310 const content::NotificationDetails& details) {
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 wm_type == ui::WM_OPENBOX || 2600 wm_type == ui::WM_OPENBOX ||
2599 wm_type == ui::WM_XFWM4); 2601 wm_type == ui::WM_XFWM4);
2600 } 2602 }
2601 2603
2602 // static 2604 // static
2603 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2605 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2604 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2606 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2605 browser_window_gtk->Init(); 2607 browser_window_gtk->Init();
2606 return browser_window_gtk; 2608 return browser_window_gtk;
2607 } 2609 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.h ('k') | chrome/browser/ui/gtk/password_generation_bubble_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698