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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_gtk.h

Issue 261033: GTK: Draw a strikethrough over bad https.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: styles Created 11 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/gfx/rect.h"
13 #include "base/scoped_ptr.h" 14 #include "base/scoped_ptr.h"
14 #include "base/string_util.h" 15 #include "base/string_util.h"
15 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 16 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
16 #include "chrome/browser/toolbar_model.h" 17 #include "chrome/browser/toolbar_model.h"
17 #include "chrome/common/notification_observer.h" 18 #include "chrome/common/notification_observer.h"
18 #include "chrome/common/notification_registrar.h" 19 #include "chrome/common/notification_registrar.h"
19 #include "chrome/common/owned_widget_gtk.h" 20 #include "chrome/common/owned_widget_gtk.h"
20 #include "chrome/common/page_transition_types.h" 21 #include "chrome/common/page_transition_types.h"
21 #include "webkit/glue/window_open_disposition.h" 22 #include "webkit/glue/window_open_disposition.h"
22 23
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 static void HandleCopyClipboardThunk(GtkTextView* text_view, gpointer self) { 274 static void HandleCopyClipboardThunk(GtkTextView* text_view, gpointer self) {
274 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandleCopyClipboard(); 275 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandleCopyClipboard();
275 } 276 }
276 void HandleCopyClipboard(); 277 void HandleCopyClipboard();
277 278
278 static void HandlePasteClipboardThunk(GtkTextView* text_view, gpointer self) { 279 static void HandlePasteClipboardThunk(GtkTextView* text_view, gpointer self) {
279 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandlePasteClipboard(); 280 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandlePasteClipboard();
280 } 281 }
281 void HandlePasteClipboard(); 282 void HandlePasteClipboard();
282 283
284 static gboolean HandleExposeEventThunk(GtkTextView* text_view,
285 GdkEventExpose* expose,
286 gpointer self) {
287 return reinterpret_cast<AutocompleteEditViewGtk*>(self)->
288 HandleExposeEvent(expose);
289 }
290 gboolean HandleExposeEvent(GdkEventExpose* expose);
291
292 // Gets the GTK_TEXT_WINDOW_WIDGET coordinates for |text_view_| that bound the
293 // given iters.
294 gfx::Rect WindowBoundsFromIters(GtkTextIter* iter1, GtkTextIter* iter2);
295
283 // Actual implementation of SelectAll(), but also provides control over 296 // Actual implementation of SelectAll(), but also provides control over
284 // whether the PRIMARY selection is set to the selected text (in SelectAll(), 297 // whether the PRIMARY selection is set to the selected text (in SelectAll(),
285 // it isn't, but we want set the selection when the user clicks in the entry). 298 // it isn't, but we want set the selection when the user clicks in the entry).
286 void SelectAllInternal(bool reversed, bool update_primary_selection); 299 void SelectAllInternal(bool reversed, bool update_primary_selection);
287 300
288 // Get ready to update |text_buffer_|'s highlighting without making changes to 301 // Get ready to update |text_buffer_|'s highlighting without making changes to
289 // the PRIMARY selection. Removes the clipboard from |text_buffer_| and 302 // the PRIMARY selection. Removes the clipboard from |text_buffer_| and
290 // blocks the "mark-set" signal handler. 303 // blocks the "mark-set" signal handler.
291 void StartUpdatingHighlightedText(); 304 void StartUpdatingHighlightedText();
292 305
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // Indicates that user requested to paste clipboard. 419 // Indicates that user requested to paste clipboard.
407 // The actual paste clipboard action might be performed later if the 420 // The actual paste clipboard action might be performed later if the
408 // clipboard is not empty. 421 // clipboard is not empty.
409 bool paste_clipboard_requested_; 422 bool paste_clipboard_requested_;
410 423
411 // Indicates if an Enter key press is inserted as text. 424 // Indicates if an Enter key press is inserted as text.
412 // It's used in the key press handler to determine if an Enter key event is 425 // It's used in the key press handler to determine if an Enter key event is
413 // handled by IME or not. 426 // handled by IME or not.
414 bool enter_was_inserted_; 427 bool enter_was_inserted_;
415 428
429 // Contains the character range that should have a strikethrough (used for
430 // insecure schemes). If the range is size one or less, no strikethrough
431 // is needed.
432 CharRange strikethrough_;
433
416 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); 434 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk);
417 }; 435 };
418 436
419 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 437 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698