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

Side by Side Diff: chrome/test/base/test_browser_window.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
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/test/base/test_browser_window.h" 5 #include "chrome/test/base/test_browser_window.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/ui/browser_list.h" 8 #include "chrome/browser/ui/browser_list.h"
9 #include "chrome/browser/ui/browser_list_observer.h" 9 #include "chrome/browser/ui/browser_list_observer.h"
10 #include "content/public/browser/keyboard_event_processing_result.h" 10 #include "content/public/browser/keyboard_event_processing_result.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 bool TestBrowserWindow::IsTabStripEditable() const { 138 bool TestBrowserWindow::IsTabStripEditable() const {
139 return false; 139 return false;
140 } 140 }
141 141
142 bool TestBrowserWindow::IsToolbarVisible() const { 142 bool TestBrowserWindow::IsToolbarVisible() const {
143 return false; 143 return false;
144 } 144 }
145 145
146 bool TestBrowserWindow::IsToolbarShowing() const {
147 return IsToolbarVisible();
sky 2017/04/06 20:38:10 Is there a reason to have this call IsToolbarVisib
Hzj_jie 2017/04/06 20:42:09 In platform other than Mac OS, the toolbar is show
sky 2017/04/06 21:43:56 This is a test class though, can't the implementat
Hzj_jie 2017/04/06 21:48:11 Yes, BrowserWindowCocoa overrides this function an
sky 2017/04/06 23:26:00 Sorry, I'm confused. Why can't this return false?
148 }
149
146 ShowTranslateBubbleResult TestBrowserWindow::ShowTranslateBubble( 150 ShowTranslateBubbleResult TestBrowserWindow::ShowTranslateBubble(
147 content::WebContents* contents, 151 content::WebContents* contents,
148 translate::TranslateStep step, 152 translate::TranslateStep step,
149 translate::TranslateErrors::Type error_type, 153 translate::TranslateErrors::Type error_type,
150 bool is_user_gesture) { 154 bool is_user_gesture) {
151 return ShowTranslateBubbleResult::SUCCESS; 155 return ShowTranslateBubbleResult::SUCCESS;
152 } 156 }
153 157
154 autofill::SaveCardBubbleView* TestBrowserWindow::ShowSaveCreditCardBubble( 158 autofill::SaveCardBubbleView* TestBrowserWindow::ShowSaveCreditCardBubble(
155 content::WebContents* contents, 159 content::WebContents* contents,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 212 }
209 213
210 TestBrowserWindowOwner::~TestBrowserWindowOwner() { 214 TestBrowserWindowOwner::~TestBrowserWindowOwner() {
211 BrowserList::RemoveObserver(this); 215 BrowserList::RemoveObserver(this);
212 } 216 }
213 217
214 void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) { 218 void TestBrowserWindowOwner::OnBrowserRemoved(Browser* browser) {
215 if (browser->window() == window_.get()) 219 if (browser->window() == window_.get())
216 delete this; 220 delete this;
217 } 221 }
OLDNEW
« chrome/browser/ui/browser_window.h ('K') | « chrome/test/base/test_browser_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698