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

Side by Side Diff: chrome/browser/website_settings.cc

Issue 10456017: Add WebsiteSettingsUI for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/website_settings.h" 5 #include "chrome/browser/website_settings.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 23 matching lines...) Expand all
34 #include "grit/chromium_strings.h" 34 #include "grit/chromium_strings.h"
35 #include "grit/generated_resources.h" 35 #include "grit/generated_resources.h"
36 #include "net/base/cert_status_flags.h" 36 #include "net/base/cert_status_flags.h"
37 #include "net/base/registry_controlled_domain.h" 37 #include "net/base/registry_controlled_domain.h"
38 #include "net/base/ssl_cipher_suite_names.h" 38 #include "net/base/ssl_cipher_suite_names.h"
39 #include "net/base/ssl_connection_status_flags.h" 39 #include "net/base/ssl_connection_status_flags.h"
40 #include "net/base/x509_certificate.h" 40 #include "net/base/x509_certificate.h"
41 #include "ui/base/l10n/l10n_util.h" 41 #include "ui/base/l10n/l10n_util.h"
42 #include "ui/base/resource/resource_bundle.h" 42 #include "ui/base/resource/resource_bundle.h"
43 43
44 #if defined(TOOLKIT_GTK) 44 #if defined(TOOLKIT_GTK)
Ben Goodger (Google) 2012/05/29 19:54:20 again, toolkit-specific ifdefs are gross, so think
markusheintz_ 2012/06/05 17:02:12 Obsolete since http://codereview.chromium.org/1044
45 #include "chrome/browser/ui/gtk/website_settings_popup_gtk.h" 45 #include "chrome/browser/ui/gtk/website_settings_popup_gtk.h"
46 #elif defined(TOOLKIT_VIEWS)
47 #include "chrome/browser/ui/views/website_settings_popup_view.h"
tfarina 2012/05/29 19:38:57 you can't do this anymore :) see chrome/browser/DE
markusheintz_ 2012/06/05 17:02:12 Obsolete since http://codereview.chromium.org/1044
46 #endif 48 #endif
47 49
48 using content::BrowserThread; 50 using content::BrowserThread;
49 51
50 namespace { 52 namespace {
51 53
52 ContentSettingsType kPermissionType[] = { 54 ContentSettingsType kPermissionType[] = {
53 CONTENT_SETTINGS_TYPE_POPUPS, 55 CONTENT_SETTINGS_TYPE_POPUPS,
54 CONTENT_SETTINGS_TYPE_PLUGINS, 56 CONTENT_SETTINGS_TYPE_PLUGINS,
55 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, 57 CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, 498 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY,
497 base::TimeFormatShortDate(first_visit)); 499 base::TimeFormatShortDate(first_visit));
498 } else { 500 } else {
499 first_visit_text = l10n_util::GetStringUTF16( 501 first_visit_text = l10n_util::GetStringUTF16(
500 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); 502 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY);
501 503
502 } 504 }
503 ui_->SetFirstVisit(first_visit_text); 505 ui_->SetFirstVisit(first_visit_text);
504 } 506 }
505 507
508 #if defined(TOOLKIT_GTK)
506 // static 509 // static
507 void WebsiteSettings::Show(gfx::NativeWindow parent, 510 void WebsiteSettings::Show(gfx::NativeWindow parent,
508 Profile* profile, 511 Profile* profile,
509 TabContentsWrapper* tab_contents_wrapper, 512 TabContentsWrapper* tab_contents_wrapper,
510 const GURL& url, 513 const GURL& url,
511 const content::SSLStatus& ssl) { 514 const content::SSLStatus& ssl) {
512 #if defined(TOOLKIT_GTK)
513 // The WebsiteSettingsModel will delete itself after the UI is closed. 515 // The WebsiteSettingsModel will delete itself after the UI is closed.
514 new WebsiteSettings(new WebsiteSettingsPopupGtk(parent, 516 new WebsiteSettings(new WebsiteSettingsPopupGtk(parent,
515 profile, 517 profile,
516 tab_contents_wrapper), 518 tab_contents_wrapper),
517 profile, 519 profile,
518 tab_contents_wrapper->content_settings(), 520 tab_contents_wrapper->content_settings(),
519 url, 521 url,
520 ssl, 522 ssl,
521 content::CertStore::GetInstance()); 523 content::CertStore::GetInstance());
524 }
525
526 #elif defined(TOOLKIT_VIEWS)
527 // static
528 void WebsiteSettings::Show(views::View* anchor_view,
tfarina 2012/05/29 19:38:57 you should implement this function in chrome/brows
Finnur 2012/05/30 11:20:04 Agree. On 2012/05/29 19:38:57, tfarina wrote:
markusheintz_ 2012/06/05 17:02:12 Obsolete since http://codereview.chromium.org/1044
markusheintz_ 2012/06/05 17:02:12 Obsolete since http://codereview.chromium.org/1044
529 Profile* profile,
530 TabContentsWrapper* tab_contents_wrapper,
531 const GURL& url,
532 const content::SSLStatus& ssl) {
533 new WebsiteSettings(new WebsiteSettingsPopupView(
534 anchor_view, profile, tab_contents_wrapper),
535 profile,
536 tab_contents_wrapper->content_settings(),
537 url,
538 ssl,
539 content::CertStore::GetInstance());
540 }
522 #endif 541 #endif
523 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698