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

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

Issue 2781633003: Allow keyboard shortcuts can be captured by webpage when toolbar is not visible (Closed)
Patch Set: Resolve review comments Created 3 years, 8 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 if (immersive_mode_controller_->ShouldHideTopViews()) 1183 if (immersive_mode_controller_->ShouldHideTopViews())
1184 return false; 1184 return false;
1185 // It's possible to reach here before we've been notified of being added to a 1185 // It's possible to reach here before we've been notified of being added to a
1186 // widget, so |toolbar_| is still null. Return false in this case so callers 1186 // widget, so |toolbar_| is still null. Return false in this case so callers
1187 // don't assume they can access the toolbar yet. 1187 // don't assume they can access the toolbar yet.
1188 return (browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) || 1188 return (browser_->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) ||
1189 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) && 1189 browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) &&
1190 toolbar_; 1190 toolbar_;
1191 } 1191 }
1192 1192
1193 bool BrowserView::IsToolbarShowing() const {
1194 return IsToolbarVisible();
1195 }
1196
1193 void BrowserView::ShowUpdateChromeDialog() { 1197 void BrowserView::ShowUpdateChromeDialog() {
1194 UpdateRecommendedMessageBox::Show(GetNativeWindow()); 1198 UpdateRecommendedMessageBox::Show(GetNativeWindow());
1195 } 1199 }
1196 1200
1197 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { 1201 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) {
1198 toolbar_->ShowBookmarkBubble(url, already_bookmarked, 1202 toolbar_->ShowBookmarkBubble(url, already_bookmarked,
1199 bookmark_bar_view_.get()); 1203 bookmark_bar_view_.get());
1200 } 1204 }
1201 1205
1202 void BrowserView::ShowBookmarkAppBubble( 1206 void BrowserView::ShowBookmarkAppBubble(
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 } 2688 }
2685 2689
2686 extensions::ActiveTabPermissionGranter* 2690 extensions::ActiveTabPermissionGranter*
2687 BrowserView::GetActiveTabPermissionGranter() { 2691 BrowserView::GetActiveTabPermissionGranter() {
2688 content::WebContents* web_contents = GetActiveWebContents(); 2692 content::WebContents* web_contents = GetActiveWebContents();
2689 if (!web_contents) 2693 if (!web_contents)
2690 return nullptr; 2694 return nullptr;
2691 return extensions::TabHelper::FromWebContents(web_contents) 2695 return extensions::TabHelper::FromWebContents(web_contents)
2692 ->active_tab_permission_granter(); 2696 ->active_tab_permission_granter();
2693 } 2697 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698