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

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

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 <stdint.h> 7 #include <stdint.h>
8
9 #include <algorithm> 8 #include <algorithm>
9 #include <utility>
10 10
11 #include "base/auto_reset.h" 11 #include "base/auto_reset.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/i18n/rtl.h" 13 #include "base/i18n/rtl.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
18 #include "base/prefs/pref_service.h" 18 #include "base/prefs/pref_service.h"
19 #include "base/profiler/scoped_tracker.h" 19 #include "base/profiler/scoped_tracker.h"
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 void BrowserView::ShowUpdateChromeDialog() { 1307 void BrowserView::ShowUpdateChromeDialog() {
1308 UpdateRecommendedMessageBox::Show(GetWidget()->GetNativeWindow()); 1308 UpdateRecommendedMessageBox::Show(GetWidget()->GetNativeWindow());
1309 } 1309 }
1310 1310
1311 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { 1311 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) {
1312 scoped_ptr<BubbleSyncPromoDelegate> delegate; 1312 scoped_ptr<BubbleSyncPromoDelegate> delegate;
1313 delegate.reset(new BookmarkBubbleSignInDelegate(browser_.get())); 1313 delegate.reset(new BookmarkBubbleSignInDelegate(browser_.get()));
1314 1314
1315 BookmarkBubbleView::ShowBubble(GetToolbarView()->GetBookmarkBubbleAnchor(), 1315 BookmarkBubbleView::ShowBubble(GetToolbarView()->GetBookmarkBubbleAnchor(),
1316 gfx::Rect(), nullptr, bookmark_bar_view_.get(), 1316 gfx::Rect(), nullptr, bookmark_bar_view_.get(),
1317 delegate.Pass(), browser_->profile(), url, 1317 std::move(delegate), browser_->profile(), url,
1318 already_bookmarked); 1318 already_bookmarked);
1319 } 1319 }
1320 1320
1321 void BrowserView::ShowBookmarkAppBubble( 1321 void BrowserView::ShowBookmarkAppBubble(
1322 const WebApplicationInfo& web_app_info, 1322 const WebApplicationInfo& web_app_info,
1323 const ShowBookmarkAppBubbleCallback& callback) { 1323 const ShowBookmarkAppBubbleCallback& callback) {
1324 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback); 1324 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback);
1325 } 1325 }
1326 1326
1327 autofill::SaveCardBubbleView* BrowserView::ShowSaveCreditCardBubble( 1327 autofill::SaveCardBubbleView* BrowserView::ShowSaveCreditCardBubble(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 scoped_ptr<OneClickSigninBubbleDelegate> delegate; 1372 scoped_ptr<OneClickSigninBubbleDelegate> delegate;
1373 delegate.reset(new OneClickSigninBubbleLinksDelegate(browser())); 1373 delegate.reset(new OneClickSigninBubbleLinksDelegate(browser()));
1374 1374
1375 views::View* anchor_view; 1375 views::View* anchor_view;
1376 if (type == BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE) 1376 if (type == BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE)
1377 anchor_view = toolbar_->app_menu_button(); 1377 anchor_view = toolbar_->app_menu_button();
1378 else 1378 else
1379 anchor_view = toolbar_->location_bar(); 1379 anchor_view = toolbar_->location_bar();
1380 1380
1381 OneClickSigninBubbleView::ShowBubble(type, email, error_message, 1381 OneClickSigninBubbleView::ShowBubble(type, email, error_message,
1382 delegate.Pass(), anchor_view, 1382 std::move(delegate), anchor_view,
1383 start_sync_callback); 1383 start_sync_callback);
1384 } 1384 }
1385 #endif 1385 #endif
1386 1386
1387 void BrowserView::SetDownloadShelfVisible(bool visible) { 1387 void BrowserView::SetDownloadShelfVisible(bool visible) {
1388 // This can be called from the superclass destructor, when it destroys our 1388 // This can be called from the superclass destructor, when it destroys our
1389 // child views. At that point, browser_ is already gone. 1389 // child views. At that point, browser_ is already gone.
1390 if (!browser_) 1390 if (!browser_)
1391 return; 1391 return;
1392 1392
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2707 return immersive_mode_controller()->IsEnabled(); 2707 return immersive_mode_controller()->IsEnabled();
2708 } 2708 }
2709 2709
2710 views::Widget* BrowserView::GetBubbleAssociatedWidget() { 2710 views::Widget* BrowserView::GetBubbleAssociatedWidget() {
2711 return GetWidget(); 2711 return GetWidget();
2712 } 2712 }
2713 2713
2714 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { 2714 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() {
2715 return top_container_->GetBoundsInScreen(); 2715 return top_container_->GetBoundsInScreen();
2716 } 2716 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_ash.cc ('k') | chrome/browser/ui/views/infobars/alternate_nav_infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698