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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 1396923003: Autofill: Replace "save credit card" infobar with a bubble (Views only). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "chrome/browser/ui/browser_list.h" 52 #include "chrome/browser/ui/browser_list.h"
53 #include "chrome/browser/ui/browser_window_state.h" 53 #include "chrome/browser/ui/browser_window_state.h"
54 #include "chrome/browser/ui/search/search_delegate.h" 54 #include "chrome/browser/ui/search/search_delegate.h"
55 #include "chrome/browser/ui/search/search_model.h" 55 #include "chrome/browser/ui/search/search_model.h"
56 #include "chrome/browser/ui/search/search_ui.h" 56 #include "chrome/browser/ui/search/search_ui.h"
57 #include "chrome/browser/ui/tabs/tab_menu_model.h" 57 #include "chrome/browser/ui/tabs/tab_menu_model.h"
58 #include "chrome/browser/ui/tabs/tab_strip_model.h" 58 #include "chrome/browser/ui/tabs/tab_strip_model.h"
59 #include "chrome/browser/ui/view_ids.h" 59 #include "chrome/browser/ui/view_ids.h"
60 #include "chrome/browser/ui/views/accelerator_table.h" 60 #include "chrome/browser/ui/views/accelerator_table.h"
61 #include "chrome/browser/ui/views/accessibility/invert_bubble_view.h" 61 #include "chrome/browser/ui/views/accessibility/invert_bubble_view.h"
62 #include "chrome/browser/ui/views/autofill/save_card_bubble_view.h"
62 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 63 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
63 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" 64 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
64 #include "chrome/browser/ui/views/browser_dialogs.h" 65 #include "chrome/browser/ui/views/browser_dialogs.h"
65 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h" 66 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h"
66 #include "chrome/browser/ui/views/download/download_shelf_view.h" 67 #include "chrome/browser/ui/views/download/download_shelf_view.h"
67 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" 68 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
68 #include "chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h" 69 #include "chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h"
69 #include "chrome/browser/ui/views/frame/browser_view_layout.h" 70 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
70 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" 71 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h"
71 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" 72 #include "chrome/browser/ui/views/frame/contents_layout_manager.h"
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 delegate.Pass(), browser_->profile(), url, 1274 delegate.Pass(), browser_->profile(), url,
1274 already_bookmarked); 1275 already_bookmarked);
1275 } 1276 }
1276 1277
1277 void BrowserView::ShowBookmarkAppBubble( 1278 void BrowserView::ShowBookmarkAppBubble(
1278 const WebApplicationInfo& web_app_info, 1279 const WebApplicationInfo& web_app_info,
1279 const ShowBookmarkAppBubbleCallback& callback) { 1280 const ShowBookmarkAppBubbleCallback& callback) {
1280 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback); 1281 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback);
1281 } 1282 }
1282 1283
1284 void BrowserView::ShowSaveCreditCardBubble(
1285 content::WebContents* web_contents,
1286 autofill::SaveCardBubbleController* controller) {
1287 autofill::SaveCardBubbleView::ShowBubble(
1288 GetToolbarView()->GetSaveCreditCardBubbleAnchor(), web_contents,
1289 controller);
1290 }
1291
1283 void BrowserView::ShowTranslateBubble( 1292 void BrowserView::ShowTranslateBubble(
1284 content::WebContents* web_contents, 1293 content::WebContents* web_contents,
1285 translate::TranslateStep step, 1294 translate::TranslateStep step,
1286 translate::TranslateErrors::Type error_type, 1295 translate::TranslateErrors::Type error_type,
1287 bool is_user_gesture) { 1296 bool is_user_gesture) {
1288 if (contents_web_view_->HasFocus() && 1297 if (contents_web_view_->HasFocus() &&
1289 !GetLocationBarView()->IsMouseHovered()) { 1298 !GetLocationBarView()->IsMouseHovered()) {
1290 content::RenderViewHost* rvh = web_contents->GetRenderViewHost(); 1299 content::RenderViewHost* rvh = web_contents->GetRenderViewHost();
1291 if (rvh->IsFocusedElementEditable()) 1300 if (rvh->IsFocusedElementEditable())
1292 return; 1301 return;
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 return immersive_mode_controller()->IsEnabled(); 2643 return immersive_mode_controller()->IsEnabled();
2635 } 2644 }
2636 2645
2637 views::Widget* BrowserView::GetBubbleAssociatedWidget() { 2646 views::Widget* BrowserView::GetBubbleAssociatedWidget() {
2638 return GetWidget(); 2647 return GetWidget();
2639 } 2648 }
2640 2649
2641 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { 2650 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() {
2642 return top_container_->GetBoundsInScreen(); 2651 return top_container_->GetBoundsInScreen();
2643 } 2652 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698