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

Side by Side Diff: chrome/browser/chromeos/login/ui/login_web_dialog.cc

Issue 812763003: Fix browser launch on the login screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Block new window popups on login screen. Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/ui/login_web_dialog.h" 5 #include "chrome/browser/chromeos/login/ui/login_web_dialog.h"
6 6
7 #include <deque> 7 #include <deque>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/chromeos/login/helper.h" 11 #include "chrome/browser/chromeos/login/helper.h"
12 #include "chrome/browser/ui/browser_dialogs.h" 12 #include "chrome/browser/ui/browser_dialogs.h"
13 #include "chrome/browser/ui/browser_finder.h"
13 #include "content/public/browser/browser_context.h" 14 #include "content/public/browser/browser_context.h"
14 #include "content/public/browser/notification_source.h" 15 #include "content/public/browser/notification_source.h"
15 #include "content/public/browser/notification_types.h" 16 #include "content/public/browser/notification_types.h"
16 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
17 #include "ui/gfx/native_widget_types.h" 18 #include "ui/gfx/native_widget_types.h"
18 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
19 #include "ui/gfx/size.h" 20 #include "ui/gfx/size.h"
20 #include "ui/views/widget/widget.h" 21 #include "ui/views/widget/widget.h"
21 22
22 using content::WebContents; 23 using content::WebContents;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool LoginWebDialog::ShouldShowDialogTitle() const { 151 bool LoginWebDialog::ShouldShowDialogTitle() const {
151 return true; 152 return true;
152 } 153 }
153 154
154 bool LoginWebDialog::HandleContextMenu( 155 bool LoginWebDialog::HandleContextMenu(
155 const content::ContextMenuParams& params) { 156 const content::ContextMenuParams& params) {
156 // Disable context menu. 157 // Disable context menu.
157 return true; 158 return true;
158 } 159 }
159 160
161 bool LoginWebDialog::HandleOpenURLFromTab(
162 content::WebContents* source,
163 const content::OpenURLParams& params,
164 content::WebContents** out_new_contents) {
165 return (source && !chrome::FindBrowserWithWebContents(source));
166 }
167
168 bool LoginWebDialog::HandleShouldCreateWebContents(
169 content::WebContents* web_contents,
170 int route_id,
171 int main_frame_route_id,
172 WindowContainerType window_container_type,
173 const base::string16& frame_name,
174 const GURL& target_url,
175 const std::string& partition_id,
176 content::SessionStorageNamespace* session_storage_namespace) {
177 return false;
178 }
179
160 void LoginWebDialog::Observe(int type, 180 void LoginWebDialog::Observe(int type,
161 const content::NotificationSource& source, 181 const content::NotificationSource& source,
162 const content::NotificationDetails& details) { 182 const content::NotificationDetails& details) {
163 DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); 183 DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME);
164 // TODO(saintlou): Do we need a throbber for Aura? 184 // TODO(saintlou): Do we need a throbber for Aura?
165 NOTIMPLEMENTED(); 185 NOTIMPLEMENTED();
166 } 186 }
167 187
168 } // namespace chromeos 188 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698