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

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: Futher comments. 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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 GtkWidget* widget = web_contents->GetContentNativeView(); 1283 GtkWidget* widget = web_contents->GetContentNativeView();
1284 new AvatarMenuBubbleGtk(browser_.get(), widget, 1284 new AvatarMenuBubbleGtk(browser_.get(), widget,
1285 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect); 1285 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect);
1286 } 1286 }
1287 1287
1288 void BrowserWindowGtk::ShowAvatarBubbleFromAvatarButton() { 1288 void BrowserWindowGtk::ShowAvatarBubbleFromAvatarButton() {
1289 if (titlebar_->avatar_button()) 1289 if (titlebar_->avatar_button())
1290 titlebar_->avatar_button()->ShowAvatarBubble(); 1290 titlebar_->avatar_button()->ShowAvatarBubble();
1291 } 1291 }
1292 1292
1293 void BrowserWindowGtk::ShowPasswordGenerationBubble(const gfx::Rect& rect) { 1293 void BrowserWindowGtk::ShowPasswordGenerationBubble(
1294 const gfx::Rect& rect,
1295 autofill::PasswordGenerator* password_generator) {
1294 WebContents* web_contents = browser_->GetSelectedWebContents(); 1296 WebContents* web_contents = browser_->GetSelectedWebContents();
1295 if (!web_contents || !web_contents->GetContentNativeView()) { 1297 if (!web_contents || !web_contents->GetContentNativeView()) {
1296 return; 1298 return;
1297 } 1299 }
1298 1300
1299 new PasswordGenerationBubbleGtk(rect, 1301 new PasswordGenerationBubbleGtk(rect,
1300 web_contents->GetContentNativeView(), 1302 web_contents->GetContentNativeView(),
1301 browser()->profile(), 1303 browser()->profile(),
1302 web_contents->GetRenderViewHost()); 1304 web_contents->GetRenderViewHost(),
1305 password_generator);
1303 } 1306 }
1304 1307
1305 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { 1308 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() {
1306 DownloadInProgressDialogGtk::Show(browser(), GetNativeHandle()); 1309 DownloadInProgressDialogGtk::Show(browser(), GetNativeHandle());
1307 } 1310 }
1308 1311
1309 void BrowserWindowGtk::Observe(int type, 1312 void BrowserWindowGtk::Observe(int type,
1310 const content::NotificationSource& source, 1313 const content::NotificationSource& source,
1311 const content::NotificationDetails& details) { 1314 const content::NotificationDetails& details) {
1312 switch (type) { 1315 switch (type) {
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 wm_type == ui::WM_OPENBOX || 2604 wm_type == ui::WM_OPENBOX ||
2602 wm_type == ui::WM_XFWM4); 2605 wm_type == ui::WM_XFWM4);
2603 } 2606 }
2604 2607
2605 // static 2608 // static
2606 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2609 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2607 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2610 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2608 browser_window_gtk->Init(); 2611 browser_window_gtk->Init();
2609 return browser_window_gtk; 2612 return browser_window_gtk;
2610 } 2613 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698