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

Side by Side Diff: chrome/browser/ui/views/extensions/media_galleries_dialog_views.cc

Issue 165073002: Remove deprecated version of views::CreateDialogFrameView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore ConstrainedWebDialogDelegateViewViews::CreateNonClientFrameView. Created 6 years, 10 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 | Annotate | Revision Log
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/browser/ui/views/extensions/media_galleries_dialog_views.h" 5 #include "chrome/browser/ui/views/extensions/media_galleries_dialog_views.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/views/constrained_window_views.h"
9 #include "components/web_modal/web_contents_modal_dialog_host.h" 8 #include "components/web_modal/web_contents_modal_dialog_host.h"
10 #include "components/web_modal/web_contents_modal_dialog_manager.h" 9 #include "components/web_modal/web_contents_modal_dialog_manager.h"
11 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
12 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
13 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
14 #include "grit/locale_settings.h" 13 #include "grit/locale_settings.h"
15 #include "third_party/skia/include/core/SkColor.h" 14 #include "third_party/skia/include/core/SkColor.h"
16 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
17 #include "ui/native_theme/native_theme.h" 16 #include "ui/native_theme/native_theme.h"
18 #include "ui/views/border.h" 17 #include "ui/views/border.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 bool MediaGalleriesDialogViews::Cancel() { 309 bool MediaGalleriesDialogViews::Cancel() {
311 return true; 310 return true;
312 } 311 }
313 312
314 bool MediaGalleriesDialogViews::Accept() { 313 bool MediaGalleriesDialogViews::Accept() {
315 accepted_ = true; 314 accepted_ = true;
316 315
317 return true; 316 return true;
318 } 317 }
319 318
320 // TODO(wittman): Remove this override once we move to the new style frame view
321 // on all dialogs.
322 views::NonClientFrameView* MediaGalleriesDialogViews::CreateNonClientFrameView(
323 views::Widget* widget) {
324 return CreateConstrainedStyleNonClientFrameView(
325 widget,
326 controller_->web_contents()->GetBrowserContext());
327 }
328
329 void MediaGalleriesDialogViews::ButtonPressed(views::Button* sender, 319 void MediaGalleriesDialogViews::ButtonPressed(views::Button* sender,
330 const ui::Event& event) { 320 const ui::Event& event) {
331 confirm_available_ = true; 321 confirm_available_ = true;
332 GetWidget()->client_view()->AsDialogClientView()->UpdateDialogButtons(); 322 GetWidget()->client_view()->AsDialogClientView()->UpdateDialogButtons();
333 323
334 if (sender == add_gallery_button_) { 324 if (sender == add_gallery_button_) {
335 controller_->OnAddFolderClicked(); 325 controller_->OnAddFolderClicked();
336 return; 326 return;
337 } 327 }
338 328
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 370 }
381 } 371 }
382 372
383 // MediaGalleriesDialogViewsController ----------------------------------------- 373 // MediaGalleriesDialogViewsController -----------------------------------------
384 374
385 // static 375 // static
386 MediaGalleriesDialog* MediaGalleriesDialog::Create( 376 MediaGalleriesDialog* MediaGalleriesDialog::Create(
387 MediaGalleriesDialogController* controller) { 377 MediaGalleriesDialogController* controller) {
388 return new MediaGalleriesDialogViews(controller); 378 return new MediaGalleriesDialogViews(controller);
389 } 379 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698